-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcompose-openwebui.yaml
More file actions
78 lines (74 loc) · 1.99 KB
/
Copy pathcompose-openwebui.yaml
File metadata and controls
78 lines (74 loc) · 1.99 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
services:
db:
image: postgres:16
restart: always
environment:
POSTGRES_DB: litellm
POSTGRES_USER: llmproxy
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d litellm -U llmproxy"]
interval: 1s
timeout: 5s
retries: 10
litellm:
image: ghcr.io/cabinlab/litellm-claude-code:latest
expose:
- "4000"
volumes:
- ./config/litellm_config.yaml:/app/config/litellm_config.yaml:ro
- ./providers:/app/config/providers:ro
- claude-auth:/home/claude/.claude
env_file:
- .env
depends_on:
db:
condition: service_healthy
restart: unless-stopped
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
expose:
- "8080"
volumes:
- open-webui:/app/backend/data
environment:
- ENABLE_OPENAI_API=true
- OPENAI_API_KEY=${LITELLM_MASTER_KEY}
- OPENAI_API_BASE_URL=http://litellm:4000/v1
- ENABLE_OLLAMA_API=false
- WEBUI_SECRET_KEY=${WEBUI_SECRET_KEY:-}
- WEBUI_SESSION_COOKIE_SECURE=true
- WEBUI_AUTH_COOKIE_SECURE=true
env_file:
- .env
depends_on:
- litellm
restart: unless-stopped
nginx:
image: nginx:alpine
container_name: nginx-proxy
ports:
- "${OPEN_WEBUI_PORT:-8090}:80"
- "${OPEN_WEBUI_HTTPS_PORT:-8443}:443"
volumes:
- ./nginx-ssl:/etc/nginx/conf.d:ro
- ./certs:/etc/nginx/ssl:rw
depends_on:
- open-webui
restart: unless-stopped
command: >
sh -c "
if [ ! -f /etc/nginx/ssl/cert.pem ]; then
apk add --no-cache openssl &&
mkdir -p /etc/nginx/ssl &&
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/key.pem -out /etc/nginx/ssl/cert.pem -subj '/CN=localhost'
fi &&
nginx -g 'daemon off;'
"
volumes:
postgres_data:
claude-auth:
open-webui: