File tree Expand file tree Collapse file tree 3 files changed +28
-10
lines changed
Expand file tree Collapse file tree 3 files changed +28
-10
lines changed Original file line number Diff line number Diff line change 22FROM node:14.7.0-alpine3.10 as build-stage
33WORKDIR /app
44COPY package*.json ./
5- # CMD ["npm", "install"]
65RUN npm install
76COPY . .
7+ EXPOSE 3000
88RUN npm run build
9+ # CMD ["npm", "run", "dev"]
910
1011# production
1112FROM nginx:1.19.1-alpine as production-stage
13+
14+ RUN rm -rf /etc/nginx/conf.d/default.conf
15+ COPY --from=build-stage /app/nginx/default.conf /etc/nginx/conf.d/default.conf
16+
17+ RUN rm -rf /usr/share/nginx/html/*
1218COPY --from=build-stage /app/dist /usr/share/nginx/html
19+
1320EXPOSE 3000
1421CMD [ "nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change 1+ server {
2+ listen 3000;
3+ server_name localhost;
4+
5+ location /api {
6+ proxy_pass "http://code.mju-rats.com-be:8888";
7+ proxy_http_version 1.1;
8+ }
9+
10+ location / {
11+ root /usr/share/nginx/html;
12+ index index.html index.htm;
13+ try_files $uri $uri/ /index.html;
14+ }
15+
16+ error_page 500 502 503 504 /50x.html;
17+ location = /50x.html {
18+ root /usr/share/nginx/html;
19+ }
20+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments