- Dockerfiles: server (Bun, runs migrations then starts) and web (Vite build served by nginx with SPA fallback); .dockerignore - docker-compose.prod.yml (postgres + server + web) ready for Dokploy, with uploads/pgdata volumes and .env.production.example - README: deployment (Dokploy) + gitflow/versioning sections, Images mode, bots, i18n; CHANGELOG.md - bump packages to 0.1.0 Docker images built and validated end-to-end: server migrates + serves /health + /api/categories; web serves the SPA with VITE_SERVER_URL baked in. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
23 lines
794 B
Docker
23 lines
794 B
Docker
# Serveur Fastify + Socket.IO (Bun, monorepo). Contexte de build = racine du repo.
|
|
FROM oven/bun:1.3.14-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Manifests d'abord (cache des dépendances).
|
|
COPY package.json bun.lock turbo.json ./
|
|
COPY apps/server/package.json apps/server/package.json
|
|
COPY apps/web/package.json apps/web/package.json
|
|
COPY packages/shared/package.json packages/shared/package.json
|
|
COPY packages/ui/package.json packages/ui/package.json
|
|
RUN bun install --frozen-lockfile
|
|
|
|
# Sources nécessaires au serveur (le client n'est pas requis ici).
|
|
COPY packages/shared packages/shared
|
|
COPY apps/server apps/server
|
|
|
|
WORKDIR /app/apps/server
|
|
ENV NODE_ENV=production
|
|
EXPOSE 3001
|
|
|
|
# Applique les migrations (idempotent) puis démarre le serveur.
|
|
CMD ["sh", "-c", "bun src/db/migrate.ts && bun src/index.ts"]
|