DEV_MODE now uses django runserver instead of gunicorn

This commit is contained in:
Eduardo Silva
2026-01-25 10:52:04 -03:00
parent 630adc762b
commit b2132057c6

11
init.sh
View File

@@ -17,8 +17,15 @@ fi
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 if [[ "${DEV_MODE,,}" == "true" ]]; then
echo "DEV_MODE=true -> Starting Gunicorn with auto-reload" echo ""
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 echo ""
echo "================================================================"
echo "= WARNING: DEV_MODE is enabled. Do not use this in production! ="
echo "================================================================"
echo ""
echo ""
echo "DEV_MODE=true -> Starting Django runserver"
exec python manage.py runserver 0.0.0.0:8000
else else
echo "Starting Gunicorn" 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 -