-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (78 loc) · 2.15 KB
/
docker-compose.yml
File metadata and controls
84 lines (78 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
services:
# PostgreSQL database for LiteLLM
postgres:
build:
context: .
dockerfile: Dockerfile.postgres
container_name: litellm-postgres
env_file:
- .env.postgres
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- litellm-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U litellm -d litellm"]
interval: 5s
timeout: 5s
retries: 5
# Redis cache for LiteLLM
redis:
build:
context: .
dockerfile: Dockerfile.redis
container_name: litellm-redis
networks:
- litellm-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
# LiteLLM proxy server (now exposed on host 4141)
litellm:
image: "litellm/litellm:v1.80.11-nightly"
container_name: litellm-proxy
ports:
- "4141:4141" # Expose LiteLLM directly on host for local access
volumes:
- ./config.yaml:/app/config.yaml # Mount the local configuration file
- /home/jzhu/.config/litellm/github_copilot/:/root/.config/litellm/github_copilot/
env_file:
- .env.litellm
command: [ "--config", "/app/config.yaml", "--port", "4141", "--num_workers", "8" ]
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
networks:
- litellm-network
# Nginx reverse proxy for HTTPS termination
# Note: This proxy expects app services to be accessible via host networking
# Start app stack separately with: docker-compose -f chat2anyllm-app/docker-compose.yml up -d
nginx:
build:
context: .
dockerfile: Dockerfile.proxy
container_name: litellm-nginx
depends_on:
- litellm
ports:
- "80:80"
- "443:443"
- "4142:4142" # Dedicated TLS entrypoint for litellm
volumes:
- ${CERT_DIR:-../certs}:/etc/nginx/certs:ro
- ./nginx/default-proxy.conf:/etc/nginx/conf.d/default.conf:ro
env_file:
- .env.nginx
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- litellm-network
volumes:
postgres_data:
networks:
litellm-network:
driver: bridge