From d5915f7f61dcf1ca217ce98d7d839fddb4d61eeb Mon Sep 17 00:00:00 2001 From: Stephan Porada Date: Thu, 6 May 2021 12:14:28 +0200 Subject: [PATCH] Add owncast and fix rtmp routes --- osp/docker-compose.yml | 8 ++++---- owncast/config.yaml | 0 owncast/docker-compose.yml | 31 +++++++++++++++++++++++++++++++ owncast/live.env.tpl | 0 traefik/docker-compose.yml | 2 +- 5 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 owncast/config.yaml create mode 100644 owncast/docker-compose.yml create mode 100644 owncast/live.env.tpl diff --git a/osp/docker-compose.yml b/osp/docker-compose.yml index 55a8eaa..a4ad510 100644 --- a/osp/docker-compose.yml +++ b/osp/docker-compose.yml @@ -27,12 +27,12 @@ services: - "traefik.http.routers.osp.tls.certresolver=myresolver" - "traefik.http.services.osp.loadbalancer.server.port=80" # RTMP specific - - "traefik.tcp.routers.rtmpcast.entrypoints=osp-rtmp" + - "traefik.tcp.routers.rtmpcast.entrypoints=rtmp" - "traefik.tcp.routers.rtmpcast.rule=HostSNI(`osp.${DOMAIN}`)" - "traefik.tcp.routers.rtmpcast.service=rtmpcast" - - "traefik.tcp.routers.rtmpcast.tls=true" - - "traefik.tcp.routers.rtmpcast.tls.certresolver=myresolver" - - "traefik.tcp.routers.rtmpcast.tls.passthrough=true" + #- "traefik.tcp.routers.rtmpcast.tls=true" + #- "traefik.tcp.routers.rtmpcast.tls.certresolver=myresolver" + #- "traefik.tcp.routers.rtmpcast.tls.passthrough=true" - "traefik.tcp.services.rtmpcast.loadbalancer.server.port=1935" networks: - default diff --git a/owncast/config.yaml b/owncast/config.yaml new file mode 100644 index 0000000..e69de29 diff --git a/owncast/docker-compose.yml b/owncast/docker-compose.yml new file mode 100644 index 0000000..a2ba087 --- /dev/null +++ b/owncast/docker-compose.yml @@ -0,0 +1,31 @@ +version: '3.5' + +networks: + default: + external: + name: traefik_default + +services: + owncast: + image: gabekangas/owncast:latest + restart: unless-stopped + container_name: owncast-app + env_file: live.env + networks: + - default + ports: + - "8080:8080" + volumes: + - ${OWNCAST_ROOT}/db:/db # Remove if you don't want chat persistant + command: /app/owncast -configFile=config.yaml -database=/db/chat.db + labels: + - "traefik.enable=true" + - "traefik.http.routers.owncast.rule=Host(`watch.${DOMAIN}`)" + - "traefik.http.routers.owncast.entrypoints=websecure" + - "traefik.http.routers.owncast.tls.certresolver=myresolver" + - "traefik.tcp.routers.rtmpcast.entrypoints=rtmp" + - "traefik.tcp.routers.rtmpcast.rule=HostSNI(`watch.${DOMAIN}`)" + - "traefik.tcp.routers.rtmpcast.service=rtmpcast" + - "traefik.tcp.routers.rtmpcast.tls=true" + - "traefik.tcp.routers.rtmpcast.tls.certresolver=myresolver" + - "traefik.tcp.services.rtmpcast.loadbalancer.server.port=1935" diff --git a/owncast/live.env.tpl b/owncast/live.env.tpl new file mode 100644 index 0000000..e69de29 diff --git a/traefik/docker-compose.yml b/traefik/docker-compose.yml index 512b74d..c3c8f1f 100644 --- a/traefik/docker-compose.yml +++ b/traefik/docker-compose.yml @@ -118,7 +118,7 @@ services: - "--entrypoints.ts-udp.address=:9987/udp" - "--entrypoints.ts-tcp.address=:30033" # OSP rtmp entrypoints - - "--entrypoints.osp-rtmp.address=:1935" + - "--entrypoints.rtmp.address=:1935" # Use this CA server for testing # - "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory" - "--certificatesresolvers.myresolver.acme.email=${EMAIL}"