Files
portfolio/Dockerfile
T
kayjaydee 39749c61c1 feat(03-04): Dockerfile SSR multi-stage + docker-compose Traefik port 3000
- Rewrite Dockerfile: node:22-alpine build + runtime, copy .output/, node server
- Add .dockerignore excluding node_modules, .nuxt, .output, src, .git, .planning
- Update docker-compose loadbalancer port from 80 to 3000
- Add SMTP and GA4 environment variables to docker-compose

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 18:40:23 +02:00

18 lines
343 B
Docker

# Stage 1: Build
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Runtime
FROM node:22-alpine AS runner
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
WORKDIR /app
COPY --from=builder /app/.output /app/.output
EXPOSE 3000
CMD ["node", "/app/.output/server/index.mjs"]