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

volumes:
  postgres_data:
