define auth port 8081
This commit is contained in:
parent
fc43178316
commit
8bb7fba56a
5 changed files with 12 additions and 5 deletions
5
auth/Dockerfile
Normal file
5
auth/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
FROM python:3
|
||||||
|
|
||||||
|
COPY auth.py /code/
|
||||||
|
|
||||||
|
EXPOSE 8081
|
|
@ -18,7 +18,7 @@ else:
|
||||||
print("missing password environment variable.")
|
print("missing password environment variable.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
listenport = 8080
|
listenport = 8081
|
||||||
|
|
||||||
def sigterm_handler(_signo, _stack_frame):
|
def sigterm_handler(_signo, _stack_frame):
|
||||||
httpd.socket.close()
|
httpd.socket.close()
|
||||||
|
|
|
@ -35,7 +35,8 @@ services:
|
||||||
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
|
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 15d & wait $${!}; done;'"
|
||||||
|
|
||||||
auth: # PSK Authentication Service
|
auth: # PSK Authentication Service
|
||||||
image: python:3
|
build: ./auth
|
||||||
|
hostname: auth
|
||||||
user: nobody
|
user: nobody
|
||||||
command: python /code/auth.py
|
command: python /code/auth.py
|
||||||
volumes:
|
volumes:
|
||||||
|
@ -43,7 +44,6 @@ services:
|
||||||
# set the PSK Password for the Auth Daemon here
|
# set the PSK Password for the Auth Daemon here
|
||||||
environment:
|
environment:
|
||||||
- password=ex4mple_p4ss
|
- password=ex4mple_p4ss
|
||||||
hostname: auth
|
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
|
@ -7,3 +7,5 @@ COPY index.html /www/
|
||||||
COPY network.m3u8 /www/
|
COPY network.m3u8 /www/
|
||||||
COPY network0.ts /www/
|
COPY network0.ts /www/
|
||||||
COPY network1.ts /www/
|
COPY network1.ts /www/
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
|
@ -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: ##
|
## 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 ##
|
## 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
|
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;
|
notify_method get;
|
||||||
# on_play http://www.example.com/plugin/Live/on_play.php;
|
# on_play http://www.example.com/plugin/Live/on_play.php;
|
||||||
# on_record_done http://www.example.com/plugin/Live/on_record_done.php';
|
# on_record_done http://www.example.com/plugin/Live/on_record_done.php';
|
||||||
|
|
Loading…
Reference in a new issue