forked from workadventure/workadventure
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.livekit.yaml
More file actions
125 lines (119 loc) · 4.66 KB
/
Copy pathdocker-compose.livekit.yaml
File metadata and controls
125 lines (119 loc) · 4.66 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
services:
livekit:
image: livekit/livekit-server:v1.10.1
command: --config /etc/livekit/config.yaml
ports:
- "7880:7880" # HTTP API
- "7881:7881/udp" # WebRTC UDP
labels:
- "traefik.enable=true"
- "traefik.http.routers.livekit.rule=Host(`livekit.workadventure.localhost`)"
- "traefik.http.routers.livekit.entryPoints=web"
- "traefik.http.services.livekit.loadbalancer.server.port=7880"
- "traefik.udp.routers.livekit-udp.entrypoints=udp"
- "traefik.udp.routers.livekit-udp.service=livekit-udp"
- "traefik.udp.services.livekit-udp.loadbalancer.server.port=7881"
volumes:
- ./livekit-config.yaml:/etc/livekit/config.yaml
depends_on:
redis:
condition: service_started
egress:
image: livekit/egress:v1.12.0
#restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.egress.rule=Host(`egress.workadventure.localhost`)"
- "traefik.http.routers.egress.entryPoints=web"
- "traefik.http.services.egress.loadbalancer.server.port=8080"
environment:
EGRESS_CONFIG_FILE: /etc/egress/config.yaml
DISABLE_CUDA: "true"
DISABLE_NVENC: "true"
EGRESS_OUTPUT_DIR: "/out"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./egress-config.yaml:/etc/egress/config.yaml
- ./out:/out:rw
- /tmp:/tmp:rw
cap_add:
- SYS_ADMIN
privileged: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8081/health"]
interval: 5s
timeout: 3s
retries: 3
depends_on:
redis:
condition: service_started
livekit:
condition: service_started
rustfs-livekit:
image: rustfs/rustfs:1.0.0-alpha.83
command: ["/data"]
labels:
- "traefik.enable=true"
- "traefik.http.routers.rustfs-livekit.rule=Host(`rustfs-livekit.workadventure.localhost`)"
- "traefik.http.routers.rustfs-livekit.entryPoints=web"
- "traefik.http.services.rustfs-livekit.loadbalancer.server.port=9001"
- "traefik.http.routers.rustfs-livekit.service=rustfs-livekit"
- "traefik.http.routers.cdn-livekit.rule=Host(`cdn-livekit.workadventure.localhost`)"
- "traefik.http.routers.cdn-livekit.entryPoints=web"
- "traefik.http.services.cdn-livekit.loadbalancer.server.port=9000"
- "traefik.http.routers.cdn-livekit.service=cdn-livekit"
environment:
RUSTFS_ACCESS_KEY: "rustfs-access-key"
RUSTFS_SECRET_KEY: "rustfs-secret-access-key"
RUSTFS_CONSOLE_ENABLE: "true"
rustfs-livekit-init:
image: amazon/aws-cli:2.31.1
depends_on:
rustfs-livekit:
condition: service_started
entrypoint: ["/bin/sh", "-ec"]
command:
- |
until aws --endpoint-url http://rustfs-livekit:9000 s3api list-buckets >/dev/null 2>&1; do
sleep 1
done
aws --endpoint-url http://rustfs-livekit:9000 s3api head-bucket --bucket livekit-recording >/dev/null 2>&1 \
|| aws --endpoint-url http://rustfs-livekit:9000 s3api create-bucket \
--bucket livekit-recording \
--create-bucket-configuration LocationConstraint=eu-west-1
environment:
AWS_ACCESS_KEY_ID: "rustfs-access-key"
AWS_SECRET_ACCESS_KEY: "rustfs-secret-access-key"
AWS_DEFAULT_REGION: "eu-west-1"
reverse-proxy:
networks:
default:
aliases:
- "livekit.workadventure.localhost"
- "egress.workadventure.localhost"
back:
depends_on:
rustfs-livekit-init:
condition: service_completed_successfully
environment:
LIVEKIT_HOST: "$LIVEKIT_HOST"
LIVEKIT_API_KEY: "$LIVEKIT_API_KEY"
LIVEKIT_API_SECRET: "$LIVEKIT_API_SECRET"
MAX_USERS_FOR_WEBRTC: "$MAX_USERS_FOR_WEBRTC"
LIVEKIT_RECORDING_S3_ENDPOINT: "$LIVEKIT_RECORDING_S3_ENDPOINT"
LIVEKIT_RECORDING_S3_ACCESS_KEY: "$LIVEKIT_RECORDING_S3_ACCESS_KEY"
LIVEKIT_RECORDING_S3_SECRET_KEY: "$LIVEKIT_RECORDING_S3_SECRET_KEY"
LIVEKIT_RECORDING_S3_REGION: "$LIVEKIT_RECORDING_S3_REGION"
LIVEKIT_RECORDING_S3_BUCKET: "$LIVEKIT_RECORDING_S3_BUCKET"
play:
environment:
LIVEKIT_API_KEY: "$LIVEKIT_API_KEY"
LIVEKIT_API_SECRET: "$LIVEKIT_API_SECRET"
LIVEKIT_RECORDING_S3_ENDPOINT: "$LIVEKIT_RECORDING_S3_ENDPOINT"
LIVEKIT_RECORDING_S3_CDN_ENDPOINT: "$LIVEKIT_RECORDING_S3_CDN_ENDPOINT"
LIVEKIT_RECORDING_S3_ACCESS_KEY: "$LIVEKIT_RECORDING_S3_ACCESS_KEY"
LIVEKIT_RECORDING_S3_SECRET_KEY: "$LIVEKIT_RECORDING_S3_SECRET_KEY"
LIVEKIT_RECORDING_S3_REGION: "$LIVEKIT_RECORDING_S3_REGION"
LIVEKIT_RECORDING_S3_BUCKET: "$LIVEKIT_RECORDING_S3_BUCKET"
LIVEKIT_PIXEL_DENSITY: "${LIVEKIT_PIXEL_DENSITY:-}"