From 10c684d2b2218b158accba4ac442c8e0a195fbf6 Mon Sep 17 00:00:00 2001 From: Kichiyaki Date: Sat, 17 Apr 2021 08:31:19 +0200 Subject: [PATCH] update Dockerfile/nginx.conf, add .env.production --- .env.production | 2 ++ Dockerfile | 3 +-- nginx.conf | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 .env.production diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..48d8404 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +REACT_APP_API_URI=https://api.zdamegzaminzawodowy.pl/graphql +REACT_APP_CDN_URI=https://cdn.zdamegzaminzawodowy.pl/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index aebe1ac..35da5fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM node:14.1.0-alpine as build-deps - #Stage 1 WORKDIR /usr/src/app @@ -12,7 +11,7 @@ RUN yarn build #Stage 2 -FROM nginx:1.17.5-alpine +FROM nginx:1.18-alpine COPY --from=build-deps /usr/src/app/build /var/www COPY nginx.conf /etc/nginx/nginx.conf EXPOSE 80 diff --git a/nginx.conf b/nginx.conf index deaa8cf..680b941 100644 --- a/nginx.conf +++ b/nginx.conf @@ -36,14 +36,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"; }