Brief-Generator/frontend/Dockerfile.prod
cami 6a3d510cad
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Change Dockerfiles and docker-compose file
The reason for this change is to reduce the image size for the different containers
2021-09-01 02:20:53 +02:00

20 lines
418 B
Text

FROM node:slim as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci --production && npm cache clean --force
COPY . ./
RUN npm run build
FROM nginx:alpine
RUN apk -U upgrade
COPY --from=build /app/build /usr/share/nginx/html
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]