(livekit) run locally Egress service

LiveKit offers Universal Egress, designed to provide universal exports
of LiveKit sessions or tracks to a file or stream data.

Egress is kept outside of the server to keep the load off the SFU and avoid
impacting real-time audio or video performance/quality.

Followed the "Running Locally" steps from the https://github.com/livekit/egress
repository, but I adapted them to docker-compose.

By default, I chose to run both the LiveKit server and the Egress when you
up the stack. If we see any performance issue, we could only run the LiveKit
server, which is the barebone of the product.

Egress will be usefull only when dealing with recording/exporting data.
Egress service will output file recordings to "./docker/livekit/out"

Note: the Egress service doesn't run as root. You need to update the "/out"
permissions, so all user could write to it.
This commit is contained in:
antoine lebaud
2024-07-05 16:43:54 +02:00
committed by aleb_the_flash
parent 0c9b609245
commit 0c55f4a6e1
4 changed files with 21 additions and 0 deletions

3
.gitignore vendored
View File

@@ -79,3 +79,6 @@ db.sqlite3
.vscode/
*.iml
.devcontainer
# Egress output
docker/livekit/out

View File

@@ -162,3 +162,14 @@ services:
- ./docker/livekit/config/livekit-server.yaml:/config.yaml
depends_on:
- redis
- livekit-egress
livekit-egress:
image: livekit/egress
environment:
EGRESS_CONFIG_FILE: ./livekit-egress.yaml
volumes:
- ./docker/livekit/config/livekit-egress.yaml:/livekit-egress.yaml
- ./docker/livekit/out:/out
depends_on:
- redis

View File

@@ -0,0 +1,7 @@
log_level: debug
api_key: devkey
api_secret: secret
ws_url: "ws://livekit:7880"
insecure: true
redis:
address: redis:6379

View File