first commit
This commit is contained in:
20
Containerfile
Normal file
20
Containerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
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"]
|
||||
Reference in New Issue
Block a user