version: '3.9'

services:
  postgres:
    image: postgres:16-alpine
    container_name: yoga_postgres
    restart: unless-stopped
    environment:
      POSTGRES_USER: yoga_user
      POSTGRES_PASSWORD: yoga_pass_2024
      POSTGRES_DB: yoga_assessment
    ports:
      - "5435:5432"
    volumes:
      - yoga_pg_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U yoga_user -d yoga_assessment"]
      interval: 5s
      timeout: 5s
      retries: 10

volumes:
  yoga_pg_data:
