Skip to content

Commit fc76c0b

Browse files
author
dodo
committed
update Docker config
1 parent 3012e6e commit fc76c0b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.git
3+
.gitignore

Dockerfile

+10-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
FROM node:12
2-
3-
WORKDIR /code.mju-rats.com-FE
4-
5-
1+
#build stage
2+
FROM node:14.7.0-alpine3.10 as build-stage
3+
WORKDIR /app
64
COPY package*.json ./
7-
COPY yarn.lock ./
8-
9-
COPY . .
10-
RUN rm -rf node_modules
5+
#CMD ["npm", "install"]
116
RUN npm install
7+
COPY . .
8+
RUN npm run build
129

10+
#production
11+
FROM nginx:1.19.1-alpine as production-stage
12+
COPY --from=build-stage /app/dist /usr/share/nginx/html
1313
EXPOSE 3000
14-
15-
CMD ["npm", "run", "dev"]
14+
CMD [ "nginx", "-g", "daemon off;" ]

0 commit comments

Comments
 (0)