33 lines
553 B
Docker
Raw Permalink 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
RUN apt-get update
RUN apt-get install -y postgresql-client
2024-01-07 14:59:51 +01:00
ENV NODE_ENV=production
USER node
WORKDIR /home/node/app
COPY package.json package-lock.json entrypoint.sh ./
2024-01-07 14:59:51 +01:00
RUN npm ci
COPY --from=production_buildstage /home/node/app/dist /home/node/app/dist
CMD ["./entrypoint.sh"]
2023-12-21 17:07:35 +01:00
FROM base as development
2024-01-07 14:59:51 +01:00
WORKDIR /home/node/app