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

57 lines
2.3 KiB
YAML
Raw Normal View History

2020-09-21 15:47:31 +00:00
# Example of Docker Compose setup using Traefik reverse proxy
version: '3'
services:
traefik:
image: traefik:v2.2.11
restart: always
ports:
- 80:80
- 443:443
- 9710:9710
2020-09-21 15:47:31 +00:00
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik_data:/data
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.srtsecure.address=:9710"
2020-09-21 15:47:31 +00:00
# Define certificates
- "--certificatesResolvers.mytlschallenge.acme.email=root@example.com"
- "--certificatesResolvers.mytlschallenge.acme.storage=/data/acme.json"
- "--certificatesResolvers.mytlschallenge.acme.httpChallenge.entryPoint=web"
2020-09-27 19:55:22 +00:00
ghostream:
build: ..
restart: always
ports:
- 10000-10005:10000-10005/udp
volumes:
- ./ghostream_data:/etc/ghostream:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.ghostream.rule=Host(`stream.example.com`)"
- "traefik.http.routers.ghostream.entrypoints=websecure"
- "traefik.http.routers.ghostream.tls.certresolver=mytlschallenge"
- "traefik.http.routers.ghostream.service=ghostream"
- "traefik.http.services.ghostream.loadbalancer.server.port=8080"
- "traefik.http.routers.ghostream-metrics.rule=Host(`stream.example.com`) && PathPrefix(`/metrics`)"
- "traefik.http.routers.ghostream-metrics.priority=100"
- "traefik.http.routers.ghostream-metrics.entrypoints=websecure"
- "traefik.http.routers.ghostream-metrics.tls.certresolver=mytlschallenge"
- "traefik.http.routers.ghostream-metrics.service=ghostream-metrics"
- "traefik.http.services.ghostream-metrics.loadbalancer.server.port=2112"
- "traefik.tcp.routers.ghostream-srt.rule=HostSNI(`stream.example.com`)"
- "traefik.tcp.routers.ghostream-srt.entrypoints=srtsecure"
- "traefik.tcp.routers.ghostream-srt.tls.certresolver=mytlschallenge"
- "traefik.tcp.routers.ghostream-srt.service=ghostream-srt"
- "traefik.tcp.services.ghostream-srt.loadbalancer.server.port=9710"