-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.litellm.yaml
More file actions
87 lines (80 loc) · 2.88 KB
/
docker-compose.litellm.yaml
File metadata and controls
87 lines (80 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# ==============================================================================
# LiteLLM Proxy + supporting services
# ==============================================================================
services:
# --------------------------------------------------------------------------
# LiteLLM Proxy
# --------------------------------------------------------------------------
litellm:
image: docker.litellm.ai/berriai/litellm:main-stable
restart: always
volumes:
- ./litellm_configs/config.yaml:/app/config.yaml:ro
- ~/.aws:/root/.aws:ro
command:
- "--config=/app/config.yaml"
ports:
- "4000:4000"
environment:
# Database — references vars from .env
DATABASE_URL: ${LITELLM_DATABASE_URL}
STORE_MODEL_IN_DB: "True" # allows adding models via UI
# AWS
AWS_REGION: us-east-1
AWS_PROFILE: fer-playground-admin
# Langfuse OTEL — keys come from .env (single source of truth)
LANGFUSE_PUBLIC_KEY: ${LANGFUSE_PUBLIC_KEY}
LANGFUSE_SECRET_KEY: ${LANGFUSE_SECRET_KEY}
LANGFUSE_HOST: ${LANGFUSE_HOST:-http://langfuse-web:3000}
OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT}
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: ${OTEL_EXPORTER_OTLP_TRACES_ENDPOINT}
env_file:
- .env
depends_on:
litellm-db:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- python3 -c "import urllib.request; urllib.request.urlopen('http://localhost:4000/health/liveliness')"
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- litellm-internal
# --------------------------------------------------------------------------
# PostgreSQL — LiteLLM metadata store
# --------------------------------------------------------------------------
litellm-db:
image: postgres:16
restart: always
container_name: litellm_db
environment:
POSTGRES_DB: ${LITELLM_DB_NAME:-litellm}
POSTGRES_USER: ${LITELLM_DB_USER:-llmproxy}
POSTGRES_PASSWORD: ${LITELLM_DB_PASSWORD:-dbpassword9090}
ports:
- "127.0.0.1:15432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${LITELLM_DB_NAME:-litellm} -U ${LITELLM_DB_USER:-llmproxy}"]
interval: 1s
timeout: 5s
retries: 10
networks:
- litellm-internal
# ==============================================================================
# Networks
# ==============================================================================
networks:
# Internal network for LiteLLM components only
litellm-internal:
driver: bridge
# ==============================================================================
# Volumes
# ==============================================================================
volumes:
postgres_data:
name: litellm_postgres_data