mafap/nginx/Dockerfile.prod

18 lines
343 B
Docker
Raw Normal View History

2023-04-04 17:44:06 -04:00
FROM node:16-alpine as build
WORKDIR /app
COPY ./client/ /app/
# prepare for build
RUN npm install --silent
RUN npm run build
# now, start nginx
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
COPY ./nginx/nginx.prod.conf /etc/nginx/conf.d/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]