From acad4c140b928e4f240e5726ab32c126aca1ad5c Mon Sep 17 00:00:00 2001 From: wilson Date: Sat, 21 Feb 2026 07:51:17 +0000 Subject: [PATCH] chore: web.Dockerfile update --- web.Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 web.Dockerfile diff --git a/web.Dockerfile b/web.Dockerfile new file mode 100644 index 0000000..f49b92b --- /dev/null +++ b/web.Dockerfile @@ -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" ]