-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathdocker-compose-litellm.yml
More file actions
70 lines (67 loc) · 2.15 KB
/
Copy pathdocker-compose-litellm.yml
File metadata and controls
70 lines (67 loc) · 2.15 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
services:
db:
image: postgres:16
environment:
POSTGRES_DB: litellm
POSTGRES_USER: litellm
# Use env. variable LITELLM_DB_PASSWORD
# otherwise default to litellm_password
POSTGRES_PASSWORD: ${LITELLM_DB_PASSWORD:-litellm_password}
ports:
- "5432:5432"
volumes:
- deepwiki_litellm_db:/var/lib/postgresql/data
litellm:
image: ghcr.io/berriai/litellm:v1.83.10-stable
ports:
- "4000:4000"
volumes:
- ./litellm-config.yml:/app/config.yaml
environment:
# Use env. variable LITELLM_MASTER_KEY
# otherwise default to sk-1234
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY:-sk-1234}
# Using from litellm-config.yml
#environment:
# DATABASE_URL: postgres://litellm:litellm_password@db:5432/litellm
command: [ "--config", "/app/config.yaml", "--port", "4000" ]
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
- db
deepwiki:
image: deepwiki-litellm # Using image name to show it depends on LiteLLM
build:
context: .
dockerfile: Dockerfile-litellm # ← Using Dockerfile that depends on LiteLLM
ports:
- "${PORT:-8001}:${PORT:-8001}" # API port
- "3000:3000" # Next.js port
env_file:
- docker-compose-litellm.env
environment:
- PORT=${PORT:-8001}
- NODE_ENV=production
- SERVER_BASE_URL=http://localhost:${PORT:-8001}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
- LOG_FILE_PATH=${LOG_FILE_PATH:-api/logs/application.log}
# For LiteLLM
- LITELLM_BASE_URL=${LITELLM_BASE_URL}
- LITELLM_API_KEY=${LITELLM_API_KEY}
volumes:
- ~/.adalflow:/root/.adalflow # Persist repository and embedding data
- ./api/logs:/app/api/logs # Persist log files across container restarts
# Resource limits for docker-compose up (not Swarm mode)
mem_limit: 6g
mem_reservation: 2g
# Health check configuration
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT:-8001}/health"]
interval: 60s
timeout: 10s
retries: 3
start_period: 30s
depends_on:
- litellm
volumes:
deepwiki_litellm_db: