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

volumes:
  orthoglobe_pgdata:
