update Dockerfile/nginx.conf, add .env.production
This commit is contained in:
parent
5c985e5edc
commit
10c684d2b2
|
@ -0,0 +1,2 @@
|
|||
REACT_APP_API_URI=https://api.zdamegzaminzawodowy.pl/graphql
|
||||
REACT_APP_CDN_URI=https://cdn.zdamegzaminzawodowy.pl/
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue