We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3012e6e commit fc76c0bCopy full SHA for fc76c0b
.dockerignore
@@ -0,0 +1,3 @@
1
+node_modules
2
+.git
3
+.gitignore
Dockerfile
@@ -1,15 +1,14 @@
-FROM node:12
-
-WORKDIR /code.mju-rats.com-FE
4
5
+#build stage
+FROM node:14.7.0-alpine3.10 as build-stage
+WORKDIR /app
6
COPY package*.json ./
7
-COPY yarn.lock ./
8
9
-COPY . .
10
-RUN rm -rf node_modules
+#CMD ["npm", "install"]
11
RUN npm install
+COPY . .
+RUN npm run build
12
+#production
+FROM nginx:1.19.1-alpine as production-stage
+COPY --from=build-stage /app/dist /usr/share/nginx/html
13
EXPOSE 3000
14
15
-CMD ["npm", "run", "dev"]
+CMD [ "nginx", "-g", "daemon off;" ]
0 commit comments