services: postgres: image: pgvector/pgvector:pg16 restart: unless-stopped environment: POSTGRES_DB: vectordb POSTGRES_USER: vecuser POSTGRES_PASSWORD: vecpass volumes: - pgdata:/var/lib/postgresql/data - ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql healthcheck: test: ["CMD-SHELL", "pg_isready -U vecuser -d vectordb"] interval: 10s timeout: 5s retries: 5 litellm: image: ghcr.io/berriai/litellm:main-latest restart: unless-stopped ports: - "4000:4000" volumes: - ./litellm_config.yaml:/app/config.yaml depends_on: postgres: condition: service_healthy vector-api: build: context: . dockerfile: Dockerfile target: runtime restart: unless-stopped ports: - "8000:8000" env_file: .env depends_on: postgres: condition: service_healthy litellm: condition: service_started healthcheck: test: ["CMD", "python", "-c", "import httpx; httpx.get('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 volumes: pgdata: