mirror of
https://github.com/SrIzan10/hctv.git
synced 2026-06-06 00:56:56 +00:00
refactor: optimize authentication requests
This commit is contained in:
@@ -15,41 +15,6 @@ services:
|
||||
- ./redis:/data
|
||||
ports:
|
||||
- 6379:6379
|
||||
nginx-rtmp:
|
||||
# ports:
|
||||
# - 1935:1935
|
||||
# - 8888:8888
|
||||
network_mode: host
|
||||
environment:
|
||||
UID: 1000
|
||||
GID: 1000
|
||||
API_AUTH: skibiditoilet
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/templates/nginx.conf.template
|
||||
- ./html:/var/www/html
|
||||
- /dev/shm/hls:/dev/shm/hls
|
||||
image: srizan10/flv-module
|
||||
entrypoint:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
# Process the template file
|
||||
mkdir -p /usr/local/nginx/conf
|
||||
envsubst '$${API_AUTH}' < /etc/nginx/templates/nginx.conf.template > /usr/local/nginx/conf/nginx.conf
|
||||
|
||||
echo "Setting UID to $${UID} and GID to $${GID}"
|
||||
usermod -u $${UID} nginx || echo "failed to change uid"
|
||||
groupmod -g $${GID} nginx || echo "failed to change gid"
|
||||
|
||||
mkdir -p /usr/local/nginx/proxy_temp /usr/local/nginx/client_body_temp
|
||||
chown -R nginx:nginx /usr/local/nginx
|
||||
mkdir -p /var/www/html
|
||||
chown -R nginx:nginx /var/www/html
|
||||
|
||||
echo "testing nginx config..."
|
||||
/usr/local/nginx/sbin/nginx -t
|
||||
|
||||
/usr/local/nginx/sbin/nginx -g 'daemon off;'
|
||||
mediamtx:
|
||||
image: bluenviron/mediamtx:latest
|
||||
ports:
|
||||
|
||||
Reference in New Issue
Block a user