Final commit for today

Changed some stuff with Compose
This commit is contained in:
slashtechno 2022-12-17 22:34:10 -06:00
parent 7a32a3eb6f
commit f4aae2b2e5
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
2 changed files with 4 additions and 3 deletions

View File

@ -46,8 +46,8 @@ services:
- RUN_BY_COMPOSE=true
depends_on:
- bridge
# Use wait-for-it to wait for the bridge at port 8554 to be ready and then run /app/main.py
command: /bin/bash -c "wait-for-it.sh -h bridge -p 1935 --timeout=0 --strict -- echo "done" && python /app/main.py"
# Use wait-for-it to wait for the bridge at port 8888 (hls) to be ready and then run /app/main.py
# command: /bin/bash -c "wait-for-it.sh -h bridge -p 8888 --timeout=0 --strict -- echo "done" && python /app/main.py"
# How can this be run and a .env file passed?

View File

@ -90,7 +90,8 @@ for i in range(5):
# If it is not, print an error and exit
try:
# Replace rtsp with http and the port with 8888
r = requests.get(URL.replace("rtsp", "http").replace(":8554", ":8888"))
url = URL.replace("rtsp", "http").replace(":8554", ":8888")
r = requests.get(url)
if r.status_code != 200:
print("HLS stream not available, please check your URL")
exit()