version: "3.9"

services:
  db:
    image: postgres:15
    container_name: soulsync_postgres
    environment:
      POSTGRES_USER: soulsync
      POSTGRES_PASSWORD: soulsync
      POSTGRES_DB: soulsync_db
    volumes:
      - db_data:/var/lib/postgresql/data
    ports:
      - "5432:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U soulsync"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  db_data:
