|
| 1 | +services: |
| 2 | + # Redis - For tracking assistant message counts |
| 3 | + redis: |
| 4 | + image: redis:7-alpine |
| 5 | + platform: linux/amd64 |
| 6 | + container_name: proxy-redis |
| 7 | + ports: |
| 8 | + - "6379:6379" # Expose for debugging if needed |
| 9 | + networks: |
| 10 | + - litellm-network |
| 11 | + restart: unless-stopped |
| 12 | + command: redis-server --appendonly yes |
| 13 | + volumes: |
| 14 | + - redis-data:/data |
| 15 | + |
| 16 | + # LiteLLM Backend - Handles actual LLM proxying |
| 17 | + litellm-backend: |
| 18 | + image: litellm/litellm:v1.77.3-stable |
| 19 | + platform: linux/amd64 |
| 20 | + container_name: litellm-backend |
| 21 | + command: ["--config", "/app/config.yaml", "--port", "4000", "--host", "0.0.0.0"] |
| 22 | + environment: |
| 23 | + - LANGFUSE_PUBLIC_KEY=dummy # Set dummy public and private key so Langfuse instance initializes in LiteLLM, then real keys get sent in proxy |
| 24 | + - LANGFUSE_SECRET_KEY=dummy |
| 25 | + - LANGFUSE_HOST=https://langfuse.fireworks.ai |
| 26 | + volumes: |
| 27 | + - ./config_no_cache.yaml:/app/config.yaml:ro |
| 28 | + ports: |
| 29 | + - "4001:4000" # Expose on 4001 for direct access if needed |
| 30 | + networks: |
| 31 | + - litellm-network |
| 32 | + restart: unless-stopped |
| 33 | + |
| 34 | + # Metadata Gateway - Public-facing service that extracts metadata from URLs |
| 35 | + metadata-gateway: |
| 36 | + build: |
| 37 | + context: . |
| 38 | + dockerfile: Dockerfile.gateway |
| 39 | + container_name: metadata-gateway |
| 40 | + environment: |
| 41 | + # Point to the LiteLLM backend service |
| 42 | + - LITELLM_URL=http://litellm-backend:4000 |
| 43 | + - PORT=4000 |
| 44 | + # Redis configuration for assistant message counting |
| 45 | + - REDIS_HOST=redis |
| 46 | + - REDIS_PORT=6379 |
| 47 | + # No password for local Redis |
| 48 | + - REQUEST_TIMEOUT=300 |
| 49 | + # Logging level: INFO (default) |
| 50 | + - LOG_LEVEL=INFO |
| 51 | + ports: |
| 52 | + - "4000:4000" # Main public-facing port |
| 53 | + networks: |
| 54 | + - litellm-network |
| 55 | + depends_on: |
| 56 | + - litellm-backend |
| 57 | + - redis |
| 58 | + restart: unless-stopped |
| 59 | + |
| 60 | +networks: |
| 61 | + litellm-network: |
| 62 | + driver: bridge |
| 63 | + |
| 64 | +volumes: |
| 65 | + redis-data: |
0 commit comments