Files
XIP/backend/Dockerfile
Kerboul cfa2eadec9
Some checks failed
Deploy XIP / deploy (push) Failing after 37s
feat: conformite enonce - explorer, favoris, stats perso, tests, slots
Fonctionnel
- Backend messages : GET /api/messages/:id (detail) + recherche (q),
  pagination par curseur (before/limit) avec enveloppe { items, nextCursor,
  hasMore } ; le flux temps reel garde l'ancien format quand aucun parametre.
- Explorer (/explorer) : catalogue distant, recherche debouncee + annulable
  (AbortController), filtre, defilement infini, etat garde (keep-alive).
- Details par id : /message/:id et /shop/p/:id (consomment route.params).
- Favoris (/favoris) : liste perso persistee en localStorage, notation
  (note/rating/statut) via modale, refletee partout (bouton favori).
- Mes stats (/mes-stats) : agregats derives des favoris (note moyenne, top
  pays/auteurs, statuts), auto-mis a jour, route gardee si liste vide.
- Routeur : pages secondaires en lazy-load + repli, garde beforeEnter.

Technique
- Slots : PrefSection (slot defaut + slot nomme) enveloppe les 5 sections
  "Mes Persos" ; Modal (Teleport + slots).
- v-model custom : SearchBox (defineModel + debounce).
- Directive custom : v-click-outside.
- Tests Vitest : 25 tests (etat, fonctions, composants), ~86% du code metier.
- Retrait d'Ionic (inutilise). Script typecheck backend ; tsconfig @types/bun.
- Correctif type : garde stockLimit nullable dans l'achat (catalog.ts).
- README complet (URL, stack, run, tests, secrets, deploiement, mention IA).
2026-05-31 23:59:34 +02:00

23 lines
853 B
Docker

# XIP backend — Bun + Hono + Prisma.
# Build context is the repo ROOT (see docker-compose.prod.yml) so we can copy backend/.
FROM oven/bun:1-debian AS deps
WORKDIR /app
COPY backend/package.json ./
RUN bun install
FROM oven/bun:1-debian AS runtime
WORKDIR /app
ENV NODE_ENV=production
# Prisma's query engine needs openssl + CA certs (generate downloads it over HTTPS).
RUN apt-get update \
&& apt-get install -y --no-install-recommends openssl ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=deps /app/node_modules ./node_modules
COPY backend/ ./
# Generate the Prisma client from the schema (no DB connection required).
RUN bunx prisma generate \
&& chmod +x docker-entrypoint.sh
EXPOSE 3000
# Entrypoint applies migrations + seeds (idempotent) then starts the server.
ENTRYPOINT ["/app/docker-entrypoint.sh"]