services: qdrant: image: qdrant/qdrant:v1.15.1 container_name: qdrant ports: - "6333:6333" # HTTP API - "6334:6334" # gRPC API volumes: - ./data/qdrant/storage:/qdrant/storage environment: - QDRANT__SERVICE__HTTP_PORT=6333 - QDRANT__SERVICE__GRPC_PORT=6334 deploy: resources: limits: memory: 4G cpus: '2' reservations: memory: 2G cpus: '1' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:6333/healthz"] interval: 10s timeout: 5s retries: 3 backend: build: context: . dockerfile: ./src/backend/Dockerfile container_name: backend ports: - "8000:8000" env_file: - .env environment: # Local Qdrant (when USE_CLOUD_QDRANT=false) - QDRANT_HOST=http://qdrant:6333 - QDRANT_GRPC_PORT=6334 # Cloud Qdrant settings from .env (USE_CLOUD_QDRANT, QDRANT_CLOUD_URL, QDRANT_CLOUD_API_KEY) - USE_CLOUD_QDRANT=${USE_CLOUD_QDRANT:-false} - QDRANT_CLOUD_URL=${QDRANT_CLOUD_URL} - QDRANT_CLOUD_API_KEY=${QDRANT_CLOUD_API_KEY} - ENVIRONMENT=${ENVIRONMENT:-localhost} volumes: - ./data:/app/data healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/healthcheck"] interval: 10s timeout: 5s retries: 3 depends_on: - qdrant pipeline: build: context: . dockerfile: ./src/lex/Dockerfile container_name: pipeline env_file: - .env environment: - QDRANT_HOST=http://qdrant:6333 - QDRANT_GRPC_PORT=6334 - ENVIRONMENT=${ENVIRONMENT:-localhost} volumes: - ./data:/app/data # Keep container running for executing commands tty: true stdin_open: true # Increased memory for parallel embedding generation (50 workers) deploy: resources: limits: memory: 8G reservations: memory: 4G depends_on: - qdrant