services:
  postgres:
    image: postgres:16-alpine
    container_name: aijianzhan-pg
    environment:
      POSTGRES_USER: platform
      POSTGRES_PASSWORD: platform
      POSTGRES_DB: platform
    ports:
      - "5432:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U platform -d platform"]
      interval: 3s
      timeout: 3s
      retries: 20

volumes:
  pgdata:
