From 72f15824852237ea2845e02076240e2d1daf493b Mon Sep 17 00:00:00 2001 From: Kichiyaki Date: Sat, 24 Apr 2021 09:45:49 +0200 Subject: [PATCH] update nginx.conf/Dockerfile/circleci config --- .circleci/config.yml | 6 +++--- Dockerfile | 6 +++--- nginx.conf | 11 ++--------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e6c22e..0bfbfd4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,11 +2,12 @@ version: 2 jobs: build: docker: - - image: circleci/node:12.9.1-browsers + - image: circleci/node:14.16.1-browsers working_directory: ~/twhelp steps: - checkout - - setup_remote_docker + - setup_remote_docker: + version: 20.10.2 # start proprietary DB using private Docker image # with credentials stored in the UI - run: | @@ -26,4 +27,3 @@ workflows: branches: only: - master - \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a1b3e40..84b8b51 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.1.0-alpine as build-deps +FROM node:14.16.1-alpine as build-deps #Stage 1 @@ -12,8 +12,8 @@ RUN yarn build #Stage 2 -FROM nginx:1.17.5-alpine +FROM nginx:1.20-alpine COPY --from=build-deps /usr/src/app/build /var/www COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file +CMD ["nginx", "-g", "daemon off;"] diff --git a/nginx.conf b/nginx.conf index 76df03f..ab23976 100644 --- a/nginx.conf +++ b/nginx.conf @@ -16,16 +16,11 @@ http { # what is the default one default_type application/octet-stream; - # Sets the path, format, and configuration for a buffered log write - log_format compression '$remote_addr - $remote_user [$time_local] ' - '"$request" $status $upstream_addr ' - '"$http_referer" "$http_user_agent"'; - server { # listen on port 80 listen 80; # save logs here - access_log /var/log/nginx/access.log compression; + access_log /var/log/nginx/access.log combined; # where the root here root /var/www; @@ -36,14 +31,12 @@ http { # Fonts and media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|ttf)$ { expires 1M; - access_log off; add_header Cache-Control "public"; } # Javascript and CSS files location ~* \.(?:css|webmanifest|js|woff2|manifest)$ { expires 1y; - access_log off; add_header Cache-Control "public"; } @@ -54,4 +47,4 @@ http { } } -} \ No newline at end of file +}