chore: add Dockerfile for TanStack Start production build

This commit is contained in:
2026-04-21 23:19:44 +02:00
parent 2590d60e58
commit 58921ca65b
3 changed files with 56 additions and 18 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
# Stage 1 — deps + build
FROM oven/bun:1 AS builder
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
# Stage 2 — production runtime
FROM node:22-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.output ./.output
EXPOSE 3000
ENV NODE_ENV=production
CMD ["node", ".output/server/index.mjs"]