chore: web.Dockerfile update
This commit is contained in:
parent
0fa3510cf2
commit
acad4c140b
1 changed files with 22 additions and 0 deletions
22
web.Dockerfile
Normal file
22
web.Dockerfile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Use a Node.js Alpine image for the builder stage
|
||||
FROM node:24-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
COPY pnpm-lock.yaml ./
|
||||
|
||||
ENV CI=true
|
||||
RUN npm i -g pnpm
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY . .
|
||||
RUN pnpm build
|
||||
RUN pnpm prune --prod
|
||||
|
||||
# Use another Node.js Alpine image for the final stage
|
||||
FROM node:24-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build build/
|
||||
COPY --from=builder /app/node_modules node_modules/
|
||||
COPY package.json .
|
||||
EXPOSE 3000
|
||||
ENV NODE_ENV=production
|
||||
CMD [ "node", "build" ]
|
||||
Loading…
Reference in a new issue