remove_dev_server

This commit is contained in:
ahmed531998 2023-04-07 00:52:41 +02:00
parent 6469bae51b
commit 7535338e80
1 changed files with 14 additions and 5 deletions

View File

@ -5,16 +5,25 @@ WORKDIR /app
COPY . .
#RUN npm install
RUN npm ci
RUN npm install
#RUN npm run build
FROM node:16-alpine
WORKDIR /usr/src/app
COPY --from=build app/node_modules node_modules
COPY . .
CMD [ "npm", run, "start:prod" ]
RUN npm run build
# production env
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
#FROM nginx:stable-alpine
#COPY --from=build /app/build /usr/share/nginx/html
#COPY /app/build /usr/share/nginx/html
#EXPOSE 80
#CMD ["npm", "start"]
CMD ["nginx", "-g", "daemon off;"]
#CMD ["nginx", "-g", "daemon off;"]