services:
  db:
    image: postgres:16
    container_name: jadwa-db-dev
    environment:
      POSTGRES_DB: jadwa
      POSTGRES_USER: jadwa
      POSTGRES_PASSWORD: jadwa_dev_password
    ports:
      - "5432:5432"
    volumes:
      - jadwa_pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U jadwa -d jadwa"]
      interval: 5s
      timeout: 3s
      retries: 10

volumes:
  jadwa_pgdata:
