File size: 617 Bytes
1947612
 
f95e0b4
1947612
f95e0b4
1947612
f95e0b4
 
 
 
 
 
 
 
 
 
 
1947612
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# Run collectstatic to ensure staticfiles dir exists (suppresses WhiteNoise warning)
cd /app/backend
python manage.py collectstatic --noinput --clear 2>&1 | tail -3

# Start Django backend:
#   --workers 1   : one worker to avoid loading the 346MB ONNX model twice
#   --timeout 300 : 5 min timeout — model load + coarse heatmap needs headroom
#   --preload     : load model in master before forking so workers inherit it
gunicorn core.wsgi:application \
    --bind 127.0.0.1:8000 \
    --workers 1 \
    --timeout 300 \
    --preload &

# Start Express/Vite frontend in the root
cd /app
npm run start