-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (58 loc) · 1.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
60 lines (58 loc) · 1.99 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
services:
server:
build:
# Default: standalone clone of this repo (`docker compose up -d`).
# Dockerfile fetches librtmp2 from Git when the context is librtmp2-server.
# Optional monorepo override (OpenRTMP parent with sibling librtmp2/):
# context: ..
# dockerfile: librtmp2-server/Dockerfile
context: .
dockerfile: Dockerfile
image: ghcr.io/OpenRTMP/librtmp2-server:latest
container_name: librtmp2-server
restart: unless-stopped
environment:
- LRTMP2_HTTP_BIND=0.0.0.0:8080
- LRTMP2_RTMP_BIND=0.0.0.0:1935
- LRTMP2_LOG_LEVEL=2
- LRTMP2_DB=/data/server.db
# Uncomment to also accept RTMPS (TLS) alongside plaintext RTMP:
# - LRTMP2_TLS_ENABLED=true
# - LRTMP2_TLS_CERT_FILE=/certs/fullchain.pem
# - LRTMP2_TLS_KEY_FILE=/certs/privkey.pem
# - LRTMP2_RTMPS_BIND=0.0.0.0:1936
# Optional HA cluster (binary includes --features cluster; runtime default off):
# - LRTMP2_CLUSTER_ENABLED=true
# - LRTMP2_CLUSTER_NODE_ID=1
# - LRTMP2_CLUSTER_BOOTSTRAP=true
# - LRTMP2_CLUSTER_SECRET=<long-random-secret>
# - LRTMP2_CLUSTER_BIND=0.0.0.0:1940
# - LRTMP2_CLUSTER_MEDIA_BIND=0.0.0.0:1941
# HTTP rate limiting (sliding window per client IP + route class):
# - LRTMP2_HTTP_RATE_LIMIT_WINDOW_SECS=60
# - LRTMP2_HTTP_RATE_LIMIT_STATS=30
# - LRTMP2_HTTP_RATE_LIMIT_API=120
# - LRTMP2_HTTP_RATE_LIMIT_DEFAULT=60
# - LRTMP2_HTTP_MAX_BODY_BYTES=65536
volumes:
- server-data:/data
# - ./certs:/certs:ro
ports:
- "1935:1935"
# - "1936:1936"
- "8080:8080"
# Cluster internal (trusted peers only — do not expose publicly):
# - "1940:1940"
# - "1941:1941"
networks:
- openrtmp
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:8080/api/v1/health"]
interval: 30s
timeout: 5s
retries: 3
volumes:
server-data:
networks:
openrtmp:
driver: bridge