33800 Docs

← Retour
# Build stage FROM oven/bun:1-alpine AS builder WORKDIR /app # Copier les fichiers de dépendances COPY package.json bun.lockb* ./ # Installer toutes les dépendances (y compris devDependencies pour le build) RUN bun install --frozen-lockfile # Copier le code source COPY . . # Build Qwik RUN bun run build # Runtime stage FROM oven/bun:1-alpine WORKDIR /app # Copier uniquement ce qui est nécessaire pour le runtime COPY --from=builder /app/dist ./dist COPY --from=builder /app/server ./server COPY --from=builder /app/package.json ./ COPY --from=builder /app/node_modules ./node_modules ENV NODE_ENV=production ENV PORT=3000 ENV ORIGIN=http://localhost:3000 EXPOSE ${PORT} # Healthcheck HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \ CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT}/health || exit 1 CMD ["bun", "run", "serve"]