-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.webui.yml
More file actions
143 lines (136 loc) · 3.39 KB
/
Copy pathdocker-compose.webui.yml
File metadata and controls
143 lines (136 loc) · 3.39 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
version: "3.8"
services:
webui:
build:
context: .
dockerfile: cmd/webui/Dockerfile
target: runtime
container_name: longbow-quarrel-webui
ports:
- "8080:8080"
- "9090:9090"
volumes:
- ./models:/data/models:ro
- ./cache:/data/cache
environment:
- WEBUI_PORT=8080
- WEBUI_METRICS_PORT=9090
- WEBUI_HOST=0.0.0.0
- WEBUI_DATA_DIR=/data
- WEBUI_CACHE_DIR=/data/cache
- WEBUI_API_KEY=${WEBUI_API_KEY:-}
- WEBUI_ALLOWED_ORIGINS=${WEBUI_ALLOWED_ORIGINS:-*}
restart: unless-stopped
deploy:
resources:
limits:
# Use GPU if available
nvidia.com/gpu: 1
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- webui-network
profiles:
- cuda
webui-cpu:
build:
context: .
dockerfile: cmd/webui/Dockerfile
target: runtime-cpu
container_name: longbow-quarrel-webui-cpu
ports:
- "8080:8080"
- "9090:9090"
volumes:
- ./models:/data/models:ro
- ./cache:/data/cache
environment:
- WEBUI_PORT=8080
- WEBUI_METRICS_PORT=9090
- WEBUI_HOST=0.0.0.0
- WEBUI_DATA_DIR=/data
- WEBUI_CACHE_DIR=/data/cache
- WEBUI_API_KEY=${WEBUI_API_KEY:-}
- WEBUI_ALLOWED_ORIGINS=${WEBUI_ALLOWED_ORIGINS:-*}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/healthz"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
- webui-network
profiles:
- cpu
prometheus:
image: prom/prometheus:v2.48.0
container_name: longbow-quarrel-prometheus
ports:
- "9090:9090"
volumes:
- ./docker/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.enable-lifecycle'
- '--web.enable-admin-api'
restart: unless-stopped
networks:
- webui-network
profiles:
- monitoring
grafana:
image: grafana/grafana:10.2.0
container_name: longbow-quarrel-grafana
ports:
- "3000:3000"
volumes:
- ./docker/grafana/provisioning:/etc/grafana/provisioning:ro
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
restart: unless-stopped
networks:
- webui-network
depends_on:
- prometheus
profiles:
- monitoring
nginx:
image: nginx:alpine
container_name: longbow-quarrel-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
- ./ssl:/etc/nginx/ssl:ro
environment:
- NGINX_HOST=localhost
restart: unless-stopped
networks:
- webui-network
depends_on:
- webui
profiles:
- nginx
networks:
webui-network:
driver: bridge
volumes:
prometheus_data:
grafana_data: