-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·160 lines (152 loc) · 3.57 KB
/
docker-compose.yml
File metadata and controls
executable file
·160 lines (152 loc) · 3.57 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: mylittlellm
services:
ollama:
image: ollama/ollama:latest
container_name: ollama
volumes:
- ollama-data:/root/.ollama
ports:
- "11434:11434"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
networks:
- ai-network
healthcheck:
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/localhost/11434 || exit 1"]
interval: 20s
timeout: 10s
retries: 5
start_period: 40s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
open-webui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
volumes:
- open-webui-data:/app/backend/data
ports:
- "8080:8080"
environment:
- OLLAMA_BASE_URL=http://ollama:11434
- DISABLE_AUTH=True
- ENABLE_SIGNUP=False
- DEFAULT_USER_ROLES=admin
- AUTH_MODE=none
- WEBUI_AUTH=none
- ENABLE_OPENAI_API=False
- ENABLE_DIRECT_CONNECTIONS=False
- CORS_ALLOW_ORIGIN=http://localhost:8080,http://127.0.0.1:8080
depends_on:
ollama:
condition: service_healthy
networks:
- ai-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 10s
timeout: 5s
retries: 20
start_period: 30s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
uptime-kuma:
image: louislam/uptime-kuma:1
container_name: uptime-kuma
volumes:
- uptime-kuma-data:/app/data
ports:
- "3001:3001"
depends_on:
ollama:
condition: service_healthy
open-webui:
condition: service_healthy
networks:
- ai-network
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3001/health || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
watchtower:
image: containrrr/watchtower:latest
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 3000 open-webui ollama uptime-kuma
depends_on:
open-webui:
condition: service_started
ollama:
condition: service_started
uptime-kuma:
condition: service_started
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Centralized logging with Loki + Grafana
loki:
image: grafana/loki:latest
container_name: loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
networks:
- ai-network
volumes:
- loki-data:/loki
restart: unless-stopped
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- grafana-data:/var/lib/grafana
networks:
- ai-network
restart: unless-stopped
depends_on:
- loki
networks:
ai-network:
name: ai-network
driver: bridge
volumes:
ollama-data:
name: ollama-data
open-webui-data:
name: open-webui-data
uptime-kuma-data:
name: uptime-kuma-data
loki-data:
name: loki-data
grafana-data:
name: grafana-data