diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8a25cf5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM node:20-alpine AS builder + +WORKDIR /app + +COPY package*.json ./ +RUN npm ci + +COPY . . +RUN npm run build + +# ── Runtime ────────────────────────────────────────── +FROM node:20-alpine AS runtime + +WORKDIR /app + +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./package.json + +ENV HOST=0.0.0.0 +ENV PORT=4321 +ENV NODE_ENV=production + +EXPOSE 4321 + +CMD ["node", "./dist/server/entry.mjs"]