mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
feat(bs): production prepping
This commit is contained in:
@@ -12,10 +12,14 @@ hlsPartDuration: 1s
|
||||
hlsSegmentCount: 10
|
||||
|
||||
webrtc: yes
|
||||
webrtcAddress: :8889
|
||||
webrtcLocalUDPAddress: :8189
|
||||
webrtcAdditionalHosts: []
|
||||
|
||||
authMethod: http
|
||||
authHTTPAddress: http://hctv:3000/api/mediamtx/publish
|
||||
authHTTPAddress: https://hackclub.tv/api/mediamtx/publish
|
||||
|
||||
api: yes
|
||||
apiAddress: 0.0.0.0:9997
|
||||
metrics: yes
|
||||
metricsAddress: :9998
|
||||
|
||||
12
docker/mediamtx/mirror/.env.example
Normal file
12
docker/mediamtx/mirror/.env.example
Normal file
@@ -0,0 +1,12 @@
|
||||
ACME_EMAIL=ops@hackclub.tv
|
||||
|
||||
# public hostnames and stuff
|
||||
MEDIAMTX_HLS_HOST=hls.hackclub.tv
|
||||
MEDIAMTX_WEBRTC_HOST=whip.hackclub.tv
|
||||
MEDIAMTX_API_HOST=mmtxapi.hackclub.tv
|
||||
|
||||
# public ip for webrtc stuff
|
||||
MEDIAMTX_WEBRTC_ADDITIONAL_HOSTS=203.0.113.10
|
||||
|
||||
# mediamtx publish route on hctv
|
||||
MEDIAMTX_AUTH_HTTP_ADDRESS=https://hackclub.tv/api/mediamtx/publish
|
||||
63
docker/mediamtx/mirror/docker-compose.yml
Normal file
63
docker/mediamtx/mirror/docker-compose.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v3.5
|
||||
command:
|
||||
- --providers.docker=true
|
||||
- --providers.docker.exposedbydefault=false
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- --entrypoints.srt.address=:8890/udp
|
||||
- --entrypoints.webrtc-ice.address=:8189/udp
|
||||
- --certificatesresolvers.letsencrypt.acme.email=${ACME_EMAIL}
|
||||
- --certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
|
||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
|
||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8890:8890/udp
|
||||
- 8189:8189/udp
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- letsencrypt:/letsencrypt
|
||||
restart: unless-stopped
|
||||
|
||||
mediamtx:
|
||||
image: bluenviron/mediamtx:1
|
||||
volumes:
|
||||
- ./mediamtx.yml:/mediamtx.yml:ro
|
||||
environment:
|
||||
MTX_WEBRTCADDITIONALHOSTS: ${MEDIAMTX_WEBRTC_ADDITIONAL_HOSTS}
|
||||
MTX_AUTHHTTPADDRESS: ${MEDIAMTX_AUTH_HTTP_ADDRESS}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
|
||||
- traefik.http.routers.mediamtx-hls.rule=Host(`${MEDIAMTX_HLS_HOST}`)
|
||||
- traefik.http.routers.mediamtx-hls.entrypoints=websecure
|
||||
- traefik.http.routers.mediamtx-hls.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.mediamtx-hls.service=mediamtx-hls
|
||||
- traefik.http.services.mediamtx-hls.loadbalancer.server.port=8888
|
||||
|
||||
- traefik.http.routers.mediamtx-webrtc.rule=Host(`${MEDIAMTX_WEBRTC_HOST}`)
|
||||
- traefik.http.routers.mediamtx-webrtc.entrypoints=websecure
|
||||
- traefik.http.routers.mediamtx-webrtc.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.mediamtx-webrtc.service=mediamtx-webrtc
|
||||
- traefik.http.services.mediamtx-webrtc.loadbalancer.server.port=8889
|
||||
|
||||
- traefik.http.routers.mediamtx-api.rule=Host(`${MEDIAMTX_API_HOST}`)
|
||||
- traefik.http.routers.mediamtx-api.entrypoints=websecure
|
||||
- traefik.http.routers.mediamtx-api.tls.certresolver=letsencrypt
|
||||
- traefik.http.routers.mediamtx-api.service=mediamtx-api
|
||||
- traefik.http.services.mediamtx-api.loadbalancer.server.port=9997
|
||||
|
||||
- traefik.udp.routers.mediamtx-srt.entrypoints=srt
|
||||
- traefik.udp.routers.mediamtx-srt.service=mediamtx-srt
|
||||
- traefik.udp.services.mediamtx-srt.loadbalancer.server.port=8890
|
||||
|
||||
- traefik.udp.routers.mediamtx-webrtc-ice.entrypoints=webrtc-ice
|
||||
- traefik.udp.routers.mediamtx-webrtc-ice.service=mediamtx-webrtc-ice
|
||||
- traefik.udp.services.mediamtx-webrtc-ice.loadbalancer.server.port=8189
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
letsencrypt:
|
||||
26
docker/mediamtx/mirror/mediamtx.yml
Normal file
26
docker/mediamtx/mirror/mediamtx.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
paths:
|
||||
all:
|
||||
source: publisher
|
||||
|
||||
srt: yes
|
||||
srtAddress: :8890
|
||||
|
||||
hls: yes
|
||||
hlsVariant: lowLatency
|
||||
hlsSegmentDuration: 2s
|
||||
hlsPartDuration: 1s
|
||||
hlsSegmentCount: 10
|
||||
|
||||
webrtc: yes
|
||||
webrtcAddress: :8889
|
||||
webrtcLocalUDPAddress: :8189
|
||||
webrtcAdditionalHosts: []
|
||||
|
||||
authMethod: http
|
||||
authHTTPAddress: https://hackclub.tv/api/mediamtx/publish
|
||||
|
||||
api: yes
|
||||
apiAddress: :9997
|
||||
|
||||
metrics: yes
|
||||
metricsAddress: :9998
|
||||
Reference in New Issue
Block a user