define auth port 8081

This commit is contained in:
deflax 2021-10-10 22:44:31 +00:00
parent fc43178316
commit 8bb7fba56a
5 changed files with 12 additions and 5 deletions

5
auth/Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM python:3
COPY auth.py /code/
EXPOSE 8081

View file

@ -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()

View file

@ -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:

View file

@ -7,3 +7,5 @@ COPY index.html /www/
COPY network.m3u8 /www/
COPY network0.ts /www/
COPY network1.ts /www/
EXPOSE 8080

View file

@ -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';