Spaces:
Runtime error
Runtime error
File size: 969 Bytes
0ad3564 3b444d0 0ad3564 3b444d0 c3c0882 0ad3564 3b444d0 c3c0882 3b444d0 0ad3564 3b444d0 0ad3564 3b444d0 0ad3564 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #!/bin/bash
set -e
echo "--> Production Initialization Starting..."
# 1. Install Tailwind Node internal packages if they are missing
echo "--> Initializing Tailwind dependencies..."
python manage.py tailwind install --no-input || echo "Tailwind install skipped or not required"
# 2. Compile Tailwind styles into minified production files
echo "--> Compiling Tailwind production CSS layouts..."
python manage.py tailwind build --no-input || echo "Tailwind build skipped"
# 3. Collect all static assets (Django Admin UI, Theme, third-party packages)
echo "--> Collecting static configuration assets..."
python manage.py collectstatic --noinput
# 4. Process PostgreSQL database schemas and structural migrations
echo "--> Applying database migrations..."
python manage.py migrate --noinput
# 5. Execute Gunicorn web app process
echo "--> Launching Gunicorn engine on port $PORT..."
exec gunicorn config.wsgi:application --bind 0.0.0.0:$PORT --workers 3 --timeout 120 |