1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 06:12:20 +00:00
ghostream/doc/docker-compose.yml

80 lines
2.9 KiB
YAML
Raw Normal View History

2020-09-15 07:26:44 +00:00
# Example of Docker Compose setup using Traefik reverse proxy
2020-09-14 15:10:14 +00:00
version: '3'
services:
2020-09-15 08:44:57 +00:00
traefik:
image: traefik:v2.2.11
restart: always
ports:
- 443:443
- 80:80
- 1935:1935
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik_data:/data
2020-09-15 08:52:37 +00:00
command:
# Read docker-compose labels but do not expose by default
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
# Define entrypoints
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.rtmpsecure.address=:1935"
# Define certificates
- "--certificatesResolvers.mytlschallenge.acme.email=root@example.com"
- "--certificatesResolvers.mytlschallenge.acme.storage=/data/acme.json"
- "--certificatesResolvers.mytlschallenge.acme.httpChallenge.entryPoint=web"
2020-09-15 08:44:57 +00:00
2020-09-15 07:26:44 +00:00
# RTMP to WebRTC server
2020-09-14 15:10:14 +00:00
ovenmediaengine:
image: airensoft/ovenmediaengine:0.10.7
2020-09-15 08:44:57 +00:00
restart: always
2020-09-14 15:10:14 +00:00
ports:
2020-09-15 07:26:44 +00:00
# WebRTC ICE
2020-09-14 15:10:14 +00:00
- 10000-10005:10000-10005/udp
volumes:
2020-09-15 07:26:44 +00:00
- ./ovenmediaengine/conf/Server-docker.xml:/opt/ovenmediaengine/bin/origin_conf/Server.xml:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.ovenmediaengine.rule=Host(`stream.example.com`) && PathPrefix(`/app/`)"
- "traefik.http.routers.ovenmediaengine.priority=101"
2020-09-15 08:44:57 +00:00
- "traefik.http.routers.ovenmediaengine.entrypoints=websecure"
- "traefik.http.routers.ovenmediaengine.tls.certresolver=mytlschallenge"
2020-09-15 08:33:50 +00:00
- "traefik.http.services.ovenmediaengine.loadbalancer.server.port=3333"
2020-09-14 15:10:14 +00:00
2020-09-15 07:26:44 +00:00
# RTMP server that authenticate stream against ghostream
2020-09-14 15:10:14 +00:00
rtmp_server:
2020-09-15 08:44:57 +00:00
# FIXME: nginx image does not have RTMP module
# this image should be build from this repo
image: tiangolo/nginx-rtmp:latest-2020-08-16
restart: always
2020-09-15 07:26:44 +00:00
volumes:
- ./nginx/nginx-docker.conf:/etc/nginx/nginx.conf:ro
labels:
- "traefik.enable=true"
- "traefik.tcp.routers.rtmp.rule=Host(`stream.example.com`)"
2020-09-15 08:44:57 +00:00
- "traefik.tcp.routers.rtmp.entrypoints=rtmpsecure"
- "traefik.tcp.routers.rtmp.tls.certresolver=mytlschallenge"
2020-09-15 07:26:44 +00:00
- "traefik.tcp.services.rtmp.loadbalancer.server.port=1925"
2020-09-14 15:10:14 +00:00
2020-09-15 07:26:44 +00:00
# Ghostream is the web frontend to OvenMediaEngine
2020-09-14 15:10:14 +00:00
ghostream:
build: ../
2020-09-15 08:44:57 +00:00
restart: always
2020-09-14 15:10:14 +00:00
environment:
2020-09-15 07:34:03 +00:00
- FLASK_CONFIG=production
- LDAP_URI=ldap://127.0.0.1:389
- LDAP_USER_DN=cn=Users,dc=example,dc=com
- SITE_NAME=Ghostream
- SITE_HOSTNAME=localhost
- FAVICON=/favicon.ico
2020-09-15 07:26:44 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.routers.ghostream.rule=Host(`stream.example.com`)"
- "traefik.http.routers.ghostream.priority=100"
2020-09-15 08:44:57 +00:00
- "traefik.http.routers.ghostream.entrypoints=websecure"
- "traefik.http.routers.ghostream.tls.certresolver=mytlschallenge"
2020-09-15 07:26:44 +00:00
- "traefik.http.services.ghostream.loadbalancer.server.port=8080"