30 lines
494 B
Docker
Raw Normal View History

2023-12-30 16:49:13 +01:00
FROM node:20-bullseye-slim as base
2023-02-09 17:21:25 +01:00
2024-01-07 14:59:51 +01:00
FROM base as production_buildstage
2022-04-09 08:58:22 +02:00
WORKDIR /home/node/app
2024-01-07 14:59:51 +01:00
COPY package.json package-lock.json ./
2022-04-09 08:58:22 +02:00
RUN npm ci
COPY --chown=node:node . ./
RUN npm run build
2024-01-07 14:59:51 +01:00
FROM base as production
ENV NODE_ENV=production
USER node
WORKDIR /home/node/app
COPY package.json package-lock.json ./
RUN npm ci
COPY --from=production_buildstage /home/node/app/dist /home/node/app/dist
ENTRYPOINT ["npm", "run", "start:prod"]
2023-12-21 17:07:35 +01:00
FROM base as development
2024-01-07 14:59:51 +01:00
WORKDIR /home/node/app