mirror of
https://github.com/eduardogsilva/wireguard_webadmin.git
synced 2026-01-17 13:06:18 +00:00
add DEV_MODE support for Gunicorn with auto-reload
This commit is contained in:
8
init.sh
8
init.sh
@@ -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
|
||||||
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 -
|
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 -
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user