vod-rtmp/docker-compose.yml
2021-10-10 22:45:09 +00:00

69 lines
1.4 KiB
YAML

version: "3.3"
services:
lb:
image: haproxy:latest
ports:
- "80:80"
- "443:443"
- "1935:1935"
volumes:
- "./data/certificates:/certificates"
- "./config/lb:/usr/local/etc/haproxy"
depends_on:
- "certbot"
- "rtmp"
restart: always
networks:
- internal
labels:
- meta.role=lb
certbot:
image: "certbot/certbot"
hostname: certbot
volumes:
- "./data/certificates:/certificates"
- "./data/certbot/etc:/etc/letsencrypt"
- "./data/certbot/var:/var/lib/letsencrypt"
- "./logs/certbot:/var/log/letsencrypt"
restart: on-failure
networks:
- internal
labels:
- meta.role=certbot
#entrypoint: sh -c 'while true; do sleep 1; done'
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
auth: # PSK Authentication Service
build: ./auth
hostname: auth
user: nobody
command: python /code/auth.py
volumes:
- "./auth:/code"
# set the PSK Password for the Auth Daemon here
environment:
- password=ex4mple_p4ss
restart: always
networks:
- internal
labels:
- meta.role=auth
rtmp:
build: ./rtmp
hostname: rtmp
volumes:
- "./data/rtmp/hls:/tmp/hls"
depends_on:
- "auth"
restart: always
networks:
- internal
labels:
- meta.role=rtmp
networks:
internal: {}