ghostguild-org/Dockerfile
Jennie Robinson Faber 61c16d8bac
Some checks are pending
Test / vitest (push) Waiting to run
Test / playwright (push) Blocked by required conditions
Test / visual (push) Blocked by required conditions
fix: multi-stage Dockerfile and guard husky for Docker builds
Multi-stage build produces a smaller production image with only .output.
Husky prepare script now tolerates missing .git (Docker, CI).
2026-04-04 16:44:55 +01:00

16 lines
350 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --ignore-scripts && npx nuxt prepare
COPY . .
RUN npm run build
# Production stage — only the self-contained .output is needed
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.output .output
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]