add DEV_MODE support for Gunicorn with auto-reload

This commit is contained in:
Eduardo Silva
2026-01-13 20:49:32 -03:00
parent 1588c66c48
commit 886a5f5b80

View File

@@ -16,4 +16,10 @@ fi
# Django startup # Django startup
python manage.py migrate --noinput python manage.py migrate --noinput
python manage.py collectstatic --noinput python manage.py collectstatic --noinput
if [[ "${DEV_MODE,,}" == "true" ]]; then
echo "DEV_MODE=true -> Starting Gunicorn with auto-reload"
exec gunicorn wireguard_webadmin.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 2 --timeout 60 --log-level info --capture-output --access-logfile - --error-logfile - --reload
else
echo "Starting Gunicorn"
exec gunicorn wireguard_webadmin.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 2 --timeout 60 --log-level info --capture-output --access-logfile - --error-logfile - exec gunicorn wireguard_webadmin.wsgi:application --bind 0.0.0.0:8000 --workers 2 --threads 2 --timeout 60 --log-level info --capture-output --access-logfile - --error-logfile -
fi