-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (70 loc) · 2 KB
/
docker-compose.yml
File metadata and controls
75 lines (70 loc) · 2 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
services:
chat2anyllm-backend:
build:
context: ..
dockerfile: Dockerfile.backend
container_name: chat2anyllm-backend
env_file:
- ../.env.chat2anyllm-backend
environment:
# Point to a separately-started LiteLLM stack (root compose) exposed on the host.
- LITELLM_ENDPOINT=${LITELLM_ENDPOINT:-http://host.docker.internal:4141}
- DATABASE_URL=postgresql://litellm:litellm@chat2anyllm-postgres:5432/chat2anyllm
ports:
- "3001:3001"
depends_on:
chat2anyllm-postgres:
condition: service_healthy
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- chat2anyllm-network
chat2anyllm-frontend:
build:
context: ..
dockerfile: Dockerfile.frontend
container_name: chat2anyllm-frontend
env_file:
- ../.env.chat2anyllm-frontend
ports:
- "3000:3000"
depends_on:
- chat2anyllm-backend
networks:
- chat2anyllm-network
# Chat2AnyLLM Postgres (sessions/roles)
chat2anyllm-postgres:
image: postgres:16.10
container_name: chat2anyllm-postgres
environment:
POSTGRES_DB: chat2anyllm
POSTGRES_USER: litellm
POSTGRES_PASSWORD: litellm
volumes:
- chat2anyllm_postgres_data:/var/lib/postgresql/data
- ../scripts/init-chat2anyllm.sql:/docker-entrypoint-initdb.d/01-init-chat2anyllm.sql:ro
networks:
- chat2anyllm-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U litellm -d chat2anyllm"]
interval: 5s
timeout: 5s
retries: 10
# Optional: Open WebUI (connect it to LiteLLM via http://host.docker.internal:4141)
openwebui:
image: ghcr.nju.edu.cn/open-webui/open-webui:latest
container_name: open-webui
ports:
- "8000:8080"
volumes:
- open-webui:/app/backend/data
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- chat2anyllm-network
volumes:
chat2anyllm_postgres_data:
open-webui:
networks:
chat2anyllm-network:
driver: bridge