From 8bb7fba56a9c4c288a618785c7c97b4dc7a76412 Mon Sep 17 00:00:00 2001 From: deflax Date: Sun, 10 Oct 2021 22:44:31 +0000 Subject: [PATCH] define auth port 8081 --- auth/Dockerfile | 5 +++++ auth/auth.py | 2 +- docker-compose.yml | 6 +++--- rtmp/Dockerfile | 2 ++ rtmp/nginx.conf | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 auth/Dockerfile diff --git a/auth/Dockerfile b/auth/Dockerfile new file mode 100644 index 0000000..2f4f58e --- /dev/null +++ b/auth/Dockerfile @@ -0,0 +1,5 @@ +FROM python:3 + +COPY auth.py /code/ + +EXPOSE 8081 diff --git a/auth/auth.py b/auth/auth.py index fc26b68..0264d51 100644 --- a/auth/auth.py +++ b/auth/auth.py @@ -18,7 +18,7 @@ else: print("missing password environment variable.") sys.exit(1) -listenport = 8080 +listenport = 8081 def sigterm_handler(_signo, _stack_frame): httpd.socket.close() diff --git a/docker-compose.yml b/docker-compose.yml index 457e2bb..ab9f29b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,7 +35,8 @@ services: entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'" auth: # PSK Authentication Service - image: python:3 + build: ./auth + hostname: auth user: nobody command: python /code/auth.py volumes: @@ -43,8 +44,7 @@ services: # set the PSK Password for the Auth Daemon here environment: - password=ex4mple_p4ss - hostname: auth - restart: always + restart: always networks: - internal labels: diff --git a/rtmp/Dockerfile b/rtmp/Dockerfile index 50bae21..2a0c521 100644 --- a/rtmp/Dockerfile +++ b/rtmp/Dockerfile @@ -7,3 +7,5 @@ COPY index.html /www/ COPY network.m3u8 /www/ COPY network0.ts /www/ COPY network1.ts /www/ + +EXPOSE 8080 diff --git a/rtmp/nginx.conf b/rtmp/nginx.conf index 0b6a892..6f68fd9 100644 --- a/rtmp/nginx.conf +++ b/rtmp/nginx.conf @@ -107,7 +107,7 @@ rtmp { ## These option go beyond the scope of this configuration file as it contains lots of info. Please visit this url for more info: ## ## https://github.com/arut/nginx-rtmp-module/wiki/Directives#notify ## publish_notify on; ## on|off. Send "NetStream.Play.PublishNotify" & "NetStream.Play.UnpublishNotify" to subscribers. Default=off - on_publish http://auth:8000/auth; + on_publish http://auth:8081/auth; notify_method get; # on_play http://www.example.com/plugin/Live/on_play.php; # on_record_done http://www.example.com/plugin/Live/on_record_done.php';