# Compose dedie au developpement local.
# Lance uniquement Postgres. Le serveur Next tourne via `npm run dev` sur l'hote.
# Usage : docker compose -f docker-compose.dev.yml up -d

services:
  db:
    image: postgres:17-alpine
    container_name: novelia-db-dev
    restart: unless-stopped
    environment:
      POSTGRES_USER: novelia
      POSTGRES_PASSWORD: novelia_dev
      POSTGRES_DB: novelia
    volumes:
      - novelia-db-dev-data:/var/lib/postgresql/data
    ports:
      - "127.0.0.1:5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U novelia -d novelia"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s

volumes:
  novelia-db-dev-data:
