File size: 513 Bytes
8e9e698
 
 
 
 
 
 
 
 
 
16cf1ff
 
8e9e698
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -e

echo "=== SentinelScan Startup ==="
echo "[startup] Checking Python..."
python --version

echo "[startup] Testing app import..."
python -c "
import sys, os
sys.path.insert(0, os.path.abspath('backend'))
from backend import create_app
app = create_app()
print('[startup] App imported OK, routes:', len(list(app.url_map.iter_rules())))
" 2>&1

echo "[startup] Starting gunicorn..."
exec gunicorn --bind 0.0.0.0:7860 --workers 1 --timeout 300 \
  --access-logfile - --error-logfile - \
  app:app