Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
56 lines (53 loc) · 2 KB
/
Copy pathdocker-compose.yml
File metadata and controls
56 lines (53 loc) · 2 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
# ts6-stream-bot stack
#
# Single container. Renders YouTube/Twitch/etc. in a headful Chromium running
# inside Xvfb, captures the frames + audio, and (post phase 1) speaks the TS3
# voice protocol directly to push the result into a TS6 channel via the
# server's built-in stream feature. No HLS, no second nginx container.
#
# Default networking is the standard ts6-net bridge - simple, isolated, but
# WebRTC ICE candidate gathering can struggle behind docker NAT (STUN
# responses don't establish a usable srflx, so peers can't NAT-punch back
# to the bot). If you hit that, layer the host-network override on top:
#
# docker compose up -d # bridge
# docker compose -f docker-compose.yml \
# -f docker-compose.host.yml up -d # host net
#
# The host overlay drops the bridge network + port mapping and joins the
# host network namespace so STUN gives the bot real LAN/WAN candidates.
services:
bot:
build:
context: .
dockerfile: docker/Dockerfile
container_name: ts6-stream-bot
restart: unless-stopped
env_file: .env
shm_size: "1gb"
volumes:
- ./src:/app/src:ro
# Persists the TS3 client identity across container restarts.
# Without this, every restart looks like a brand-new client to the
# TS6 server and old stream slots accumulate as zombies that the
# client UI still surfaces - clicks on those go nowhere because the
# owning clid is long gone. See ts3lib/identity_store.py.
- bot-state:/app/state
ports:
- "127.0.0.1:8080:8080"
networks:
- ts6-net
healthcheck:
test: ["CMD", "curl", "-fsS", "http://localhost:8080/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
networks:
ts6-net:
external: true
volumes:
# Holds /app/state/identity.json (mode 0600). Treat the host-side path
# as sensitive: anyone with read access to the volume can impersonate
# the bot on the TS6 server.
bot-state: