From 4ebd7051c6e26d1f94372669c3ca6fb798b543ac Mon Sep 17 00:00:00 2001 From: deflax Date: Mon, 11 Oct 2021 02:02:01 +0000 Subject: [PATCH] move example config as yml.dist files --- .gitignore | 4 + .../frontend/{config.yml => config.yml.dist} | 0 docker-compose.yml.dist | 83 +++++++++++++++++++ 3 files changed, 87 insertions(+) rename config/frontend/{config.yml => config.yml.dist} (100%) create mode 100644 docker-compose.yml.dist diff --git a/.gitignore b/.gitignore index b4a04da..79c73a0 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,7 @@ data/certificates/* # ignore rtmp directories data/rtmp/hls/* !data/rtmp/hls/.placeholder + +# ignore nondist configs +docker-compose.yml +config/frontend/config.yml diff --git a/config/frontend/config.yml b/config/frontend/config.yml.dist similarity index 100% rename from config/frontend/config.yml rename to config/frontend/config.yml.dist diff --git a/docker-compose.yml.dist b/docker-compose.yml.dist new file mode 100644 index 0000000..df81435 --- /dev/null +++ b/docker-compose.yml.dist @@ -0,0 +1,83 @@ +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 + #ports: + # - "18080:18080" + volumes: + - "./data/rtmp/hls:/tmp/hls" + depends_on: + - "auth" + - "frontend" + restart: always + networks: + - internal + labels: + - meta.role=rtmp + + frontend: # container for python frontend + build: frontend/. + command: uwsgi uwsgi.ini + volumes: + - "./config/frontend/config.yml:/code/config.yml:ro" + - "./config/frontend/uwsgi.ini:/code/uwsgi.ini:ro" + restart: always + networks: + - internal + labels: + - meta.role=frontend + +networks: + internal: {} +