Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (50 loc) · 1.59 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (50 loc) · 1.59 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
services:
proxy:
build:
context: .
dockerfile: litellm-proxy/Dockerfile
ports:
- "4000:4000"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/litellm
SPRING_DATASOURCE_USERNAME: litellm
SPRING_DATASOURCE_PASSWORD: litellm
LITELLM_CONFIG: /app/config.yaml
# No default on purpose: an unset key aborts startup with a clear error instead of
# silently running with a publicly-known value. Prefer a .env file next to this compose
# file over shell exports — `sudo docker compose` strips your shell environment.
LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
# Uncomment after setting `redis_url: redis://redis:6379` in config.yaml
# SPRING_REDIS_URL: redis://redis:6379
volumes:
- ./config.yaml:/app/config.yaml:ro
depends_on:
postgres:
condition: service_healthy
# redis:
# condition: service_healthy
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: litellm
POSTGRES_USER: litellm
POSTGRES_PASSWORD: litellm
healthcheck:
test: ["CMD-SHELL", "pg_isready -U litellm"]
interval: 3s
timeout: 3s
retries: 10
volumes:
- pgdata:/var/lib/postgresql/data
# Uncomment for multi-replica deployments — see config.yaml's redis_url.
# redis:
# image: redis:7-alpine
# healthcheck:
# test: ["CMD", "redis-cli", "ping"]
# interval: 3s
# timeout: 3s
# retries: 10
volumes:
pgdata: