version: '3.8' services: # Research Bridge API research-bridge: build: context: . dockerfile: Containerfile container_name: research-bridge-api ports: - "8000:8000" environment: - RESEARCH_BRIDGE_KIMI_API_KEY=${RESEARCH_BRIDGE_KIMI_API_KEY:-} - RESEARCH_BRIDGE_SEARXNG_URL=${RESEARCH_BRIDGE_SEARXNG_URL:-http://searxng:8080} - RESEARCH_BRIDGE_RATE_LIMIT_RPM=${RESEARCH_BRIDGE_RATE_LIMIT_RPM:-60} - RESEARCH_BRIDGE_LOG_LEVEL=${RESEARCH_BRIDGE_LOG_LEVEL:-info} depends_on: searxng: condition: service_healthy redis: condition: service_started restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"] interval: 30s timeout: 10s retries: 3 # SearXNG Search Engine searxng: image: docker.io/searxng/searxng:latest container_name: research-bridge-searxng ports: - "8080:8080" volumes: - ./config/searxng-settings.yml:/etc/searxng/settings.yml:ro environment: - SEARXNG_BASE_URL=http://localhost:8080/ restart: unless-stopped healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/healthz"] interval: 30s timeout: 10s retries: 3 # Redis for caching & rate limiting redis: image: docker.io/redis:7-alpine container_name: research-bridge-redis volumes: - redis-data:/data restart: unless-stopped healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 volumes: redis-data: