mausenpeet.nl/Containerfile

20 lines
463 B
Plaintext
Raw Normal View History

2024-05-02 19:23:18 +00:00
FROM node:alpine3.18 AS builder
WORKDIR /staging
COPY . /staging/
RUN corepack enable
RUN pnpm install
RUN pnpm build
RUN pnpm prune --production
FROM node:alpine3.18
RUN apk add --no-cache tzdata
ENV TZ=Europe/Amsterdam
WORKDIR /app
COPY --from=builder /staging/package.json /staging/pnpm-lock.yaml /app/
COPY --from=builder /staging/node_modules /app/node_modules
COPY --from=builder /staging/build /app/build
EXPOSE 3000
CMD ["node", "/app/build/index.js"]