- apps/api/migrations/ : 4 migrations numérotées idempotentes
001 : schéma initial (bands, trigger geom, indexes)
002 : colonnes manquantes (enriched, themes, geocode_*) + fix trigger
→ updated_at mis à jour sur toute UPDATE (pas seulement lat/lon)
003 : geocode_queue et geocode_cache (formalisées)
004 : tracking crawl (crawled_at, crawled_hash, ma_created_at,
ma_modified_at, first_seen_at) + crawl_run + crawl_checkpoint
- apps/api/src/migrate.js : runner qui s applique au démarrage de l api
- apps/api/Dockerfile : CMD lance migrate.js avant server.js
- infra/init.sql : remplacé par notice de redirection
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
223 B
Docker
11 lines
223 B
Docker
FROM node:20-alpine
|
|
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm install --omit=dev
|
|
|
|
COPY src ./src
|
|
COPY migrations ./migrations
|
|
|
|
ENV PORT=3000
|
|
CMD ["sh", "-c", "node src/migrate.js && node src/server.js"]
|