-
-
Save hunzo/e1f5c800543c7dd9979fec4f78011cf3 to your computer and use it in GitHub Desktop.
LiteLLM docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LITELLM_MASTER_KEY=lite-llm-master-key |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| litellm: | |
| image: ghcr.io/berriai/litellm:main-latest | |
| container_name: litellm-openrouter | |
| restart: unless-stopped | |
| ports: | |
| - "4001:4000" | |
| environment: | |
| LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY} | |
| UI_USERNAME: admin | |
| UI_PASSWORD: password | |
| DATABASE_URL: postgresql://litellm:litellm@postgres:5432/litellm | |
| # OPENROUTER_API_KEY: ${OPENROUTER_API_KEY} | |
| NO_DOCS: "True" | |
| NO_REDOC: "True" | |
| NO_OPENAPI: "True" | |
| STORE_MODEL_IN_DB: "True" | |
| command: | |
| - "--config=/app/config.yaml" | |
| - "--port=4000" | |
| # แนะนำเอาออกก่อนตอน debug DB | |
| - "--num_workers=4" | |
| volumes: | |
| - ./litellm-config.yaml:/app/config.yaml:ro | |
| depends_on: | |
| - postgres | |
| postgres: | |
| image: postgres:16 | |
| container_name: litellm-openrouter-postgres | |
| restart: unless-stopped | |
| environment: | |
| POSTGRES_DB: litellm | |
| POSTGRES_USER: litellm | |
| POSTGRES_PASSWORD: litellm | |
| volumes: | |
| - ./postgres-data:/var/lib/postgresql/data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # model_list: | |
| # - model_name: gpt-oss-120b-openrouter | |
| # litellm_params: | |
| # model: openrouter/openai/gpt-oss-120b:free | |
| # api_key: os.environ/OPENROUTER_API_KEY | |
| general_settings: | |
| master_key: os.environ/LITELLM_MASTER_KEY | |
| # router_settings: | |
| # num_retries: 2 | |
| # timeout: 120 | |
| # fallbacks: | |
| # - gpt-openrouter: | |
| # - qwen3-27b-local | |
| # - gpt-openrouter-online: | |
| # - gpt-openrouter | |
| # - qwen3-27b-local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment