|
| 1 | +version: '3.8' |
| 2 | + |
| 3 | +services: |
| 4 | + llms: |
| 5 | + build: |
| 6 | + context: . |
| 7 | + dockerfile: Dockerfile |
| 8 | + image: llms-py:latest |
| 9 | + container_name: llms-py |
| 10 | + ports: |
| 11 | + - "8000:8000" |
| 12 | + environment: |
| 13 | + # API Keys - Set these in your .env file or pass them directly |
| 14 | + - OPENROUTER_API_KEY=${OPENROUTER_API_KEY:-} |
| 15 | + - GROQ_API_KEY=${GROQ_API_KEY:-} |
| 16 | + - GOOGLE_FREE_API_KEY=${GOOGLE_FREE_API_KEY:-} |
| 17 | + - GOOGLE_API_KEY=${GOOGLE_API_KEY:-} |
| 18 | + - CODESTRAL_API_KEY=${CODESTRAL_API_KEY:-} |
| 19 | + - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-} |
| 20 | + - OPENAI_API_KEY=${OPENAI_API_KEY:-} |
| 21 | + - GROK_API_KEY=${GROK_API_KEY:-} |
| 22 | + - DASHSCOPE_API_KEY=${DASHSCOPE_API_KEY:-} |
| 23 | + - ZAI_API_KEY=${ZAI_API_KEY:-} |
| 24 | + - MISTRAL_API_KEY=${MISTRAL_API_KEY:-} |
| 25 | + volumes: |
| 26 | + # Persist configuration and analytics data |
| 27 | + # The container will auto-create llms.json and ui.json on first run |
| 28 | + - llms-data:/home/llms/.llms |
| 29 | + |
| 30 | + # Alternative: Mount a local directory to use custom config files |
| 31 | + # Uncomment the line below and comment out the line above to use local configs |
| 32 | + # Place your custom llms.json and ui.json in ./config/ directory |
| 33 | + # - ./config:/home/llms/.llms |
| 34 | + |
| 35 | + # Alternative: Mount individual config files (read-only recommended) |
| 36 | + # - ./my-llms.json:/home/llms/.llms/llms.json:ro |
| 37 | + # - ./my-ui.json:/home/llms/.llms/ui.json:ro |
| 38 | + restart: unless-stopped |
| 39 | + healthcheck: |
| 40 | + test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000').read()"] |
| 41 | + interval: 30s |
| 42 | + timeout: 10s |
| 43 | + retries: 3 |
| 44 | + start_period: 5s |
| 45 | + |
| 46 | +volumes: |
| 47 | + llms-data: |
| 48 | + driver: local |
| 49 | + |
0 commit comments