forked from omkarrr2533/SMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.sh
More file actions
22 lines (17 loc) · 650 Bytes
/
start.sh
File metadata and controls
22 lines (17 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
echo "=== Collecting Static Files ==="
python manage.py collectstatic --noinput || echo "Collectstatic failed, continuing..."
echo "=== Running Migrations ==="
python manage.py migrate
echo "=== Creating Admin ==="
python manage.py create_admin && echo "Admin OK" || echo "Admin failed, continuing..."
echo "=== Testing WSGI Import ==="
python -c "from sms_project.wsgi import application; print('WSGI OK')"
echo "=== Starting Gunicorn ==="
exec gunicorn sms_project.wsgi:application \
--bind 0.0.0.0:${PORT:-8080} \
--workers 1 \
--timeout 120 \
--log-level debug \
--access-logfile - \
--error-logfile -