Dockerfile

This commit is contained in:
lukas
2026-04-15 23:06:33 +02:00
parent 09059cf285
commit a535905c6c
4 changed files with 441 additions and 1 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM node:20-alpine AS base
RUN apk add --no-cache pnpm
FROM base AS deps
WORKDIR /app
COPY pnpm-lock.yaml package.json ./
RUN pnpm install --frozen-lockfile
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
FROM base AS runner
WORKDIR /app
ENV HOST=0.0.0.0
ENV PORT=3000
COPY --from=builder /app/build ./build
COPY --from=builder /app/package.json ./package.json
EXPOSE 3000
CMD ["node", "build/index.js"]