-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
104 lines (101 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
104 lines (101 loc) · 2.62 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
services:
mohawk-gui:
build:
context: .
dockerfile: Dockerfile
container_name: mohawk-gui
ports:
- "8003:8003"
- "8443:8443"
volumes:
- ./mohawk_gui:/app/mohawk_gui
- ./certs:/app/certs
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
- QT_QPA_PLATFORM=offscreen
- DISCOVERY=true
command: >
python -m uvicorn prototype.gui_backend:app
--host 0.0.0.0 --port 8003
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
networks:
- mohawk-network
mohawk-worker:
build:
context: .
dockerfile: Dockerfile.worker
container_name: mohawk-worker
ports:
- "8004:8003"
volumes:
- ./models:/app/models
- ./certs:/app/certs
- ./logs:/app/logs
environment:
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
- QT_QPA_PLATFORM=offscreen
- DISCOVERY=true
command: >
python -m uvicorn prototype.worker_secure:app
--host 0.0.0.0 --port 8003
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8003/health"]
interval: 30s
timeout: 10s
retries: 3
restart: unless-stopped
networks:
- mohawk-network
mohawk-desktop-gui:
build:
context: .
dockerfile: Dockerfile
container_name: mohawk-desktop-gui
depends_on:
- mohawk-gui
- mohawk-worker
environment:
- PYTHONUNBUFFERED=1
- PYTHONDONTWRITEBYTECODE=1
- DISPLAY=${DISPLAY}
- QT_QPA_PLATFORM=xcb
- MOHAWK_SKIP_DESKTOP_GUI=${MOHAWK_SKIP_DESKTOP_GUI:-0}
- MOHAWK_GUI_SERVICE_URL=http://host.docker.internal:8003
- MOHAWK_WORKER_SERVICE_URL=http://host.docker.internal:8004
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
- ./certs:/app/certs
- ./logs:/app/logs
command: >
sh -c '
if [ "$$MOHAWK_SKIP_DESKTOP_GUI" = "1" ]; then
echo "Desktop GUI launch was skipped by the launcher.";
exit 0;
fi;
if [ -z "$$DISPLAY" ]; then
echo "DISPLAY is not set; skipping desktop GUI launch.";
exit 0;
fi;
until curl -fsS http://host.docker.internal:8003/health >/dev/null 2>&1; do
echo "Waiting for GUI backend...";
sleep 2;
done;
python mohawk_gui/main.py --port 8003
'
restart: "no"
networks:
- mohawk-network
networks:
mohawk-network:
name: mohawk-network
driver: bridge