20 lines
463 B
Docker
20 lines
463 B
Docker
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"] |