services: # ─── Qdrant Vector Store ─── qdrant: image: qdrant/qdrant:latest ports: - "6333:6333" volumes: - qdrant_data:/qdrant/storage restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:6333/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s # ─── Redis Cache (Session Storage & Rate Limit Tracking) ─── redis: image: redis:7-alpine ports: - "6379:6379" volumes: - redis_data:/data restart: unless-stopped command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 10s retries: 3 start_period: 10s # ─── Main Application ─── app: build: . ports: - "7860:7860" depends_on: qdrant: condition: service_healthy redis: condition: service_healthy env_file: - ../.env environment: # Use Docker network names for service discovery - QDRANT_URL=http://qdrant:6333 - REDIS_URL=redis://redis:6379/0 restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:7860/api/ai/health"] interval: 30s timeout: 10s retries: 3 start_period: 30s volumes: qdrant_data: redis_data: