feat: add production deployment scripts

run_live.sh:
- Background process management for main pipeline
- Web server startup with logging
- Zrok tunnel for remote access
- PID file management for process tracking

kill_live.sh:
- Clean process termination using stored PIDs
This commit is contained in:
2025-11-16 00:51:39 +02:00
committed by ro
parent fff9c8c140
commit cc19519c12
2 changed files with 25 additions and 0 deletions

1
kill_live.sh Executable file
View File

@@ -0,0 +1 @@
kill $(cat main.pid) $(cat webserver.pid) $(cat zrok.pid)

24
run_live.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Start main.py in the background
TQDM_DISABLE=1 nohup python3 main.py > main.log 2>&1 &
MAIN_PID=$!
echo "Started main.py with PID: $MAIN_PID"
# Start webserver in the background
nohup python3 webserver.py > webserver.log 2>&1 &
WEB_PID=$!
echo "Started webserver.py with PID: $WEB_PID"
# Start zrok
nohup zrok share reserved liveline --headless &> ./zrok.log &
ZROK_PID=$!
# Save PIDs to file for easy stopping later
echo $MAIN_PID > main.pid
echo $WEB_PID > webserver.pid
echo $ZROK_PID > zrok.pid
echo "Both processes started successfully!"
echo "To stop them, run: kill \$(cat main.pid) \$(cat webserver.pid) \$(cat zrok.pid)"