Repository navigation
Expand file tree
/
Copy pathdocker-compose.windows.yml
More file actions
232 lines (227 loc) · 10.5 KB
/
Copy pathdocker-compose.windows.yml
File metadata and controls
232 lines (227 loc) · 10.5 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
services:
overlord-server:
image: ${DOCKER_IMAGE:-ghcr.io/doesntbreaktos/overlord:latest}
build:
context: .
dockerfile: Dockerfile
cache_from:
- type=local,src=.docker-cache/buildx
cache_to:
- type=local,dest=.docker-cache/buildx,mode=max
container_name: overlord-server
user: "1000:1000"
read_only: true
cap_drop:
- ALL
tmpfs:
- /tmp:rw,nosuid,nodev,mode=1777
- /app/Overlord-Client:rw,nosuid,nodev,size=128m,uid=1000,gid=1000,mode=0755
ports:
- "${OVERLORD_PUBLISH_HOST:-0.0.0.0}:${PORT:-5173}:5173"
# HTTP/3 uses QUIC over UDP on the same port as HTTPS/TCP.
- "${OVERLORD_PUBLISH_HOST:-0.0.0.0}:${PORT:-5173}:5173/udp"
environment:
PORT: 5173
HOST: 0.0.0.0
# Optional: set an explicit initial admin account. If OVERLORD_PASS is empty,
# the server generates one-time bootstrap secrets and stores them in /app/data/save.json.
OVERLORD_USER: ${OVERLORD_USER:-admin}
OVERLORD_PASS: ${OVERLORD_PASS:-}
# Optional overrides. If empty, generated and persisted to /app/data/save.json.
JWT_SECRET: ${JWT_SECRET:-}
OVERLORD_AGENT_TOKEN: ${OVERLORD_AGENT_TOKEN:-}
NODE_ENV: ${NODE_ENV:-production}
OVERLORD_TLS_CERT: ${OVERLORD_TLS_CERT:-/app/certs/server.crt}
OVERLORD_TLS_KEY: ${OVERLORD_TLS_KEY:-/app/certs/server.key}
OVERLORD_TLS_CA: ${OVERLORD_TLS_CA:-}
OVERLORD_TLS_MIGRATE_LEGACY_CERT: ${OVERLORD_TLS_MIGRATE_LEGACY_CERT:-true}
# Required for generated-agent pinning when TLS is terminated by a proxy.
# May contain current,next pins during certificate key rotation.
OVERLORD_TLS_SPKI_PINS: ${OVERLORD_TLS_SPKI_PINS:-}
# Set true only behind a trusted reverse proxy that terminates TLS (for example Render).
# Default false keeps current behavior: Overlord terminates TLS in-process.
OVERLORD_TLS_OFFLOAD: ${OVERLORD_TLS_OFFLOAD:-false}
# Trust X-Forwarded-For / X-Real-IP / CF-Connecting-IP from an upstream proxy when
# resolving the agent's source IP shown in the dashboard, audit log, and IP bans.
# Set true only when a trusted reverse proxy (nginx, Caddy, Cloudflare, etc.) sits
# in front of Overlord — otherwise agents can spoof their IP. Auto-enabled when
# OVERLORD_TLS_OFFLOAD=true.
OVERLORD_TRUST_PROXY: ${OVERLORD_TRUST_PROXY:-false}
# Cookie security mode: auto (default), true, or false.
# auto: Secure cookie on HTTPS requests / X-Forwarded-Proto=https.
OVERLORD_AUTH_COOKIE_SECURE: ${OVERLORD_AUTH_COOKIE_SECURE:-auto}
# Optional certbot integration (used only when NODE_ENV=production)
OVERLORD_TLS_CERTBOT_ENABLED: ${OVERLORD_TLS_CERTBOT_ENABLED:-false}
OVERLORD_TLS_CERTBOT_LIVE_PATH: ${OVERLORD_TLS_CERTBOT_LIVE_PATH:-/etc/letsencrypt/live}
OVERLORD_TLS_CERTBOT_DOMAIN: ${OVERLORD_TLS_CERTBOT_DOMAIN:-}
OVERLORD_TLS_CERTBOT_CERT_FILE: ${OVERLORD_TLS_CERTBOT_CERT_FILE:-fullchain.pem}
OVERLORD_TLS_CERTBOT_KEY_FILE: ${OVERLORD_TLS_CERTBOT_KEY_FILE:-privkey.pem}
OVERLORD_TLS_CERTBOT_CA_FILE: ${OVERLORD_TLS_CERTBOT_CA_FILE:-chain.pem}
OVERLORD_CLIENT_BUILD_CACHE_DIR: ${OVERLORD_CLIENT_BUILD_CACHE_DIR:-/app/client-build-cache}
OVERLORD_FILE_UPLOAD_INTENT_TTL_MS: ${OVERLORD_FILE_UPLOAD_INTENT_TTL_MS:-1800000}
OVERLORD_FILE_UPLOAD_PULL_TTL_MS: ${OVERLORD_FILE_UPLOAD_PULL_TTL_MS:-1800000}
# WebRTC: Bun reaches MediaMTX via the docker service name on bridge net.
OVERLORD_MEDIAMTX_URL: ${OVERLORD_MEDIAMTX_URL:-http://mediamtx:8889}
OVERLORD_TURN_HOST: ${OVERLORD_TURN_HOST:-127.0.0.1}
OVERLORD_TURN_PORT: ${OVERLORD_TURN_PORT:-3478}
OVERLORD_TURN_SECRET_FILE: /run/overlord-turn/secret
OVERLORD_TURN_CREDENTIAL_TTL_SECONDS: ${OVERLORD_TURN_CREDENTIAL_TTL_SECONDS:-3600}
depends_on:
overlord-permissions-init:
condition: service_completed_successfully
mediamtx:
condition: service_started
turn-secret-init:
condition: service_completed_successfully
volumes:
- overlord-data:/app/data
- overlord-certs:/app/certs
- overlord-client-build-cache:/app/client-build-cache
- overlord-plugins:/app/plugins
- overlord-dist-clients:/app/dist-clients
- overlord-turn-secret:/run/overlord-turn:ro
# Uncomment to mount host certbot certs read-only
# - /etc/letsencrypt:/etc/letsencrypt:ro
# Uncomment to use a static config file instead of env vars
# - ./Overlord-Server/config.json:/app/config.json:ro
restart: unless-stopped
init: true
security_opt:
- no-new-privileges:true
healthcheck:
# Use http:// when OVERLORD_TLS_OFFLOAD=true.
test: ["CMD-SHELL", "wget -qO- --no-check-certificate ${OVERLORD_HEALTHCHECK_URL:-https://localhost:5173/health} >/dev/null 2>&1 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
overlord-permissions-init:
image: ${DOCKER_IMAGE:-ghcr.io/doesntbreaktos/overlord:latest}
user: "0:0"
read_only: true
entrypoint: ["/bin/sh", "-ec"]
command:
- |
for dir in /app/data /app/certs /app/client-build-cache /app/plugins /app/dist-clients; do
marker="$$dir/.overlord-uid-1000"
if [ ! -e "$$marker" ]; then
chown -R 1000:1000 "$$dir"
touch "$$marker"
chown 1000:1000 "$$marker"
fi
done
volumes:
- overlord-data:/app/data
- overlord-certs:/app/certs
- overlord-client-build-cache:/app/client-build-cache
- overlord-plugins:/app/plugins
- overlord-dist-clients:/app/dist-clients
cap_drop:
- ALL
cap_add:
- CHOWN
- DAC_OVERRIDE
security_opt:
- no-new-privileges:true
restart: "no"
turn-secret-init:
image: alpine:3.22
entrypoint: ["/bin/sh", "-ec"]
command:
- |
umask 077
if [ ! -s /run/overlord-turn/secret ]; then head -c 32 /dev/urandom | base64 > /run/overlord-turn/secret; fi
case "$${OVERLORD_TURN_REALM:-}" in *[!A-Za-z0-9.-]*) echo "Invalid OVERLORD_TURN_REALM" >&2; exit 1;; esac
if [ "$${#OVERLORD_TURN_REALM}" -gt 253 ]; then echo "OVERLORD_TURN_REALM is too long" >&2; exit 1; fi
if [ -n "$${OVERLORD_TURN_REALM:-}" ]; then
printf '%s\n' "$${OVERLORD_TURN_REALM}" > /run/overlord-turn/realm
elif [ ! -s /run/overlord-turn/realm ]; then
realm_id="$$(head -c 32 /dev/urandom | sha256sum | cut -c1-24)"
printf 'r-%s.invalid\n' "$$realm_id" > /run/overlord-turn/realm
fi
IFS= read -r turn_secret < /run/overlord-turn/secret
printf 'webrtcICEServers2:\n - url: "stun:%s:%s"\n - url: "turn:%s:%s?transport=udp"\n username: AUTH_SECRET\n password: "%s"\n clientOnly: true\n - url: "turn:%s:%s?transport=tcp"\n username: AUTH_SECRET\n password: "%s"\n clientOnly: true\n' "$${OVERLORD_TURN_HOST}" "$${OVERLORD_TURN_PORT}" "$${OVERLORD_TURN_HOST}" "$${OVERLORD_TURN_PORT}" "$$turn_secret" "$${OVERLORD_TURN_HOST}" "$${OVERLORD_TURN_PORT}" "$$turn_secret" > /run/overlord-turn/mediamtx.yml
chmod 0444 /run/overlord-turn/secret /run/overlord-turn/realm /run/overlord-turn/mediamtx.yml
environment:
OVERLORD_TURN_HOST: ${OVERLORD_TURN_HOST:-127.0.0.1}
OVERLORD_TURN_PORT: ${OVERLORD_TURN_PORT:-3478}
OVERLORD_TURN_REALM: ${OVERLORD_TURN_REALM:-}
volumes:
- overlord-turn-secret:/run/overlord-turn
restart: "no"
coturn:
image: coturn/coturn:4.14.0-r0-alpine
container_name: overlord-coturn
ports:
- "3478:3478/udp"
- "3478:3478/tcp"
# Stay below Windows' default dynamic/excluded UDP range (49152+).
- "${OVERLORD_TURN_MIN_PORT:-40000}-${OVERLORD_TURN_MAX_PORT:-40040}:${OVERLORD_TURN_MIN_PORT:-40000}-${OVERLORD_TURN_MAX_PORT:-40040}/udp"
entrypoint: ["/bin/sh", "-ec"]
command:
- |
secret="$$(cat /run/overlord-turn/secret)"
realm="$${OVERLORD_TURN_REALM:-$$(cat /run/overlord-turn/realm)}"
external=""
if [ -n "$${OVERLORD_TURN_EXTERNAL_IP:-}" ]; then external="--external-ip=$${OVERLORD_TURN_EXTERNAL_IP}"; fi
exec turnserver --fingerprint --use-auth-secret --static-auth-secret="$$secret" --realm="$$realm" --listening-port=3478 --min-port="$${OVERLORD_TURN_MIN_PORT}" --max-port="$${OVERLORD_TURN_MAX_PORT}" --no-tls --no-dtls --no-multicast-peers --log-file=stdout $$external
environment:
OVERLORD_TURN_REALM: ${OVERLORD_TURN_REALM:-}
OVERLORD_TURN_EXTERNAL_IP: ${OVERLORD_TURN_EXTERNAL_IP:-127.0.0.1}
OVERLORD_TURN_MIN_PORT: ${OVERLORD_TURN_MIN_PORT:-40000}
OVERLORD_TURN_MAX_PORT: ${OVERLORD_TURN_MAX_PORT:-40040}
volumes:
- overlord-turn-secret:/run/overlord-turn:ro
depends_on:
turn-secret-init:
condition: service_completed_successfully
restart: unless-stopped
security_opt:
- no-new-privileges:true
mediamtx:
image: bluenviron/mediamtx:1.19.2
container_name: overlord-mediamtx
user: "65534:65534"
read_only: true
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
tmpfs:
- /tmp:rw,nosuid,nodev,mode=1777
restart: unless-stopped
command: ["/run/overlord-turn/mediamtx.yml"]
ports:
# WHIP/WHEP signaling only reached by the Bun container internally,
# so we don't publish 8889. ICE UDP/TCP must be reachable from the
# outside world (browser + agent), so publish 8189.
- "8189:8189/udp"
- "8189:8189/tcp"
environment:
# Disable every protocol except WebRTC. The Overlord server proxies all
# WHIP/WHEP signaling and enforces auth itself.
MTX_RTSP: "no"
MTX_RTMP: "no"
MTX_HLS: "no"
MTX_SRT: "no"
MTX_MOQ: "no"
# Fixed ICE ports (matched by the port-publish above).
MTX_WEBRTCLOCALUDPADDRESS: ":8189"
MTX_WEBRTCLOCALTCPADDRESS: ":8189"
# Advertise 127.0.0.1 as an ICE candidate so browsers on the docker
# host can reach MediaMTX through the published port. For viewers on
# a different machine, override with the host's LAN/public IP, e.g.:
# OVERLORD_WEBRTC_ADDITIONAL_HOSTS=127.0.0.1,192.168.1.42
MTX_WEBRTCADDITIONALHOSTS: ${OVERLORD_WEBRTC_ADDITIONAL_HOSTS:-127.0.0.1}
volumes:
- overlord-turn-secret:/run/overlord-turn:ro
depends_on:
turn-secret-init:
condition: service_completed_successfully
volumes:
overlord-data:
overlord-certs:
overlord-client-build-cache:
overlord-plugins:
overlord-dist-clients:
overlord-turn-secret: