# Postgres jetable pour la suite d'intégration SQL (`npm run test:integration`). # # Ne fait PAS partie du déploiement : ce fichier n'est utilisé qu'en local, à la # demande. La suite rapide (`npm run check`) n'a jamais besoin de Docker. # # docker compose -f docker-compose.test.yml up -d # npm run test:integration # docker compose -f docker-compose.test.yml down -v services: postgres-test: # Même famille d'image que la base de production : PostGIS est indispensable # (colonnes geometry/geography, ST_MakeEnvelope, index GIST). image: postgis/postgis:16-3.4 environment: POSTGRES_USER: bm POSTGRES_PASSWORD: bm POSTGRES_DB: bm_test ports: - "55432:5432" # Base entièrement en mémoire : elle est recréée à chaque exécution, la # durabilité n'a aucun intérêt et coûte du temps. tmpfs: - /var/lib/postgresql/data command: > postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=off healthcheck: test: ["CMD-SHELL", "pg_isready -U bm -d bm_test"] interval: 2s timeout: 3s retries: 20