-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
139 lines (133 loc) · 3.47 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
139 lines (133 loc) · 3.47 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
services:
controller:
build:
context: .
dockerfile: Dockerfile.controller
ports:
- "8000:8000"
environment:
- WORKER_URLS=http://worker1:8000,http://worker2:8000
command: python -m uvicorn prototype.controller_service:app --host 0.0.0.0 --port 8000
depends_on:
- worker1
- worker2
worker1:
build:
context: .
dockerfile: Dockerfile.worker
ports:
- "8001:8000"
environment:
- PORT=8000
- HOST=0.0.0.0
command: python prototype/worker.py --host 0.0.0.0 --port 8000
worker2:
build:
context: .
dockerfile: Dockerfile.worker
ports:
- "8002:8000"
environment:
- PORT=8000
- HOST=0.0.0.0
command: python prototype/worker.py --host 0.0.0.0 --port 8000
# Secure worker for PQC testing
worker_secure:
build:
context: .
dockerfile: Dockerfile.worker
ports:
- "8005:8000"
environment:
- PORT=8000
- HOST=0.0.0.0
command: python prototype/worker.py --host 0.0.0.0 --port 8000
mohawk-gui:
build:
context: .
dockerfile: Dockerfile
container_name: mohawk-gui-dev
ports:
- "8003:8003"
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
mohawk-worker:
build:
context: .
dockerfile: Dockerfile.worker
container_name: mohawk-worker-dev
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
mohawk-desktop-gui:
build:
context: .
dockerfile: Dockerfile
container_name: mohawk-desktop-gui-dev
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"