File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ node_modules
Original file line number Diff line number Diff line change 1+ FROM node:12-alpine as build
2+
3+ WORKDIR /app
4+
5+ COPY . /app
6+
7+ RUN npm install --silent
8+ RUN npm install react-scripts@3.4.1 -g --silent
9+ RUN npm run build
10+
11+ FROM nginx:1.18-alpine
12+
13+ COPY --from=build /app/build /usr/share/nginx/html
14+ RUN rm /etc/nginx/conf.d/default.conf
15+ COPY nginx/nginx.conf /etc/nginx/nginx.conf
16+
17+ EXPOSE 80
18+ CMD [ "nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 1+ server {
2+
3+ listen 80 ;
4+
5+ location / {
6+ root /usr/share/nginx/html;
7+ index index .html index .htm;
8+ try_files $uri $uri / /index .html;
9+ }
10+
11+ error_page 500 502 503 504 /50x .html;
12+
13+ location = /50x .html {
14+ root /usr/share/nginx/html;
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments