Add Docker packaging for the TypeScript app

This commit is contained in:
2026-08-12 21:30:32 +02:00
parent 31de7f15db
commit f26a5d72b2
3 changed files with 95 additions and 0 deletions

17
Dockerfile.node Normal file
View File

@@ -0,0 +1,17 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --ignore-scripts
COPY tsconfig.json ./
COPY src ./src
RUN pnpm build
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile --prod
COPY --from=build /app/dist ./dist
ENTRYPOINT ["node", "dist/app/index.js"]