-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
78 lines (73 loc) · 1.79 KB
/
Copy pathcompose.yml
File metadata and controls
78 lines (73 loc) · 1.79 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
version: '3.8'
services:
ollama:
image: ollama/ollama:latest
container_name: cerberus_ollama
volumes:
- ollama_data:/root/.ollama
ports:
- "11434:11434"
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
command: >
sh -c "ollama serve & sleep 10 &&
(ollama list | grep -q 'llama3' || ollama pull llama3) &&
wait"
networks:
- cerberus_network
fastapi-gateway:
build:
context: ./fastapi-gateway
container_name: cerberus_fastapi
ports:
- "${API_PORT:-8000}:8000"
environment:
- OLLAMA_HOST=http://ollama:11434
- LOG_LEVEL=${LOG_LEVEL:-info}
depends_on:
ollama:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- cerberus_network
openwebui:
image: ghcr.io/open-webui/open-webui:main
container_name: cerberus_webui
ports:
- "${WEBUI_PORT:-3000}:8080"
environment:
- OLLAMA_API_BASE_URL=http://ollama:11434/api
- WEBUI_AUTH=${WEBUI_AUTH:-true}
depends_on:
ollama:
condition: service_healthy
restart: unless-stopped
volumes:
- openwebui_data:/app/backend/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
- cerberus_network
profiles:
- webui
volumes:
ollama_data:
name: cerberus_ollama_data
openwebui_data:
name: cerberus_webui_data
networks:
cerberus_network:
name: cerberus_network