services:
  pgvector:
    image: pgvector/pgvector:0.8.3-pg18-trixie
    container_name: seam-pgvector
    environment:
      - POSTGRES_DB=${POSTGRES_DB:-seam}
      - POSTGRES_USER=${POSTGRES_USER:-seam}
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?Set POSTGRES_PASSWORD in local .env before running docker compose}
      - PGDATA=/var/lib/postgresql/data/pgdata
    ports:
      - "127.0.0.1:${SEAM_PGVECTOR_PORT:-55432}:5432"
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-seam} -d ${POSTGRES_DB:-seam}"]
      interval: 5s
      timeout: 5s
      retries: 5
    volumes:
      - pgvector-data:/var/lib/postgresql/data

volumes:
  pgvector-data:
