1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 13:19:42 +02:00
codex.docs/docker/Dockerfile.prod

31 lines
468 B
Text
Raw Normal View History

2022-03-06 13:37:06 +04:00
# Stage 1 - build
FROM node:16.14.0-alpine3.15 as build
2020-11-23 14:09:33 +03:00
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install
2020-11-23 14:09:33 +03:00
COPY . .
2022-03-06 13:37:06 +04:00
RUN yarn build
RUN yarn compile
2022-03-06 13:37:06 +04:00
# Stage 2 - make final image
FROM node:16.14.0-alpine3.15
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install --production
COPY --from=build /usr/src/app/dist ./dist
COPY --from=build /usr/src/app/public ./public
ENV NODE_ENV=production
CMD ["node", "dist/bin/server.js"]