File size: 531 Bytes
86ba74e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
set -e

# Restore backup from HF Datasets
echo "Restoring database from Hugging Face Datasets..."
MODE=restore python backup_manager.py

# Start Redis Server in background
echo "Starting Redis server..."
redis-server /etc/redis/redis.conf &

# Start backup cron loop in background
echo "Starting background backup loop..."
MODE=cron python backup_manager.py &

# Start FastAPI WebSocket Proxy in foreground (port 7860 for HF Spaces)
echo "Starting FastAPI WebSocket proxy..."
uvicorn app:app --host 0.0.0.0 --port 7860