# PostgreSQL 16 with the pgvector extension. init.sql runs once, on the first start of an empty volume. services: postgres: image: pgvector/pgvector:pg16 environment: POSTGRES_DB: ragdb POSTGRES_USER: raguser POSTGRES_PASSWORD: ragpass ports: - "5432:5432" volumes: - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U raguser -d ragdb"] interval: 5s timeout: 3s retries: 10 volumes: pgdata: