diff --git a/init.sh b/init.sh index 00a7587..b841bc3 100644 --- a/init.sh +++ b/init.sh @@ -16,4 +16,10 @@ fi # Django startup python manage.py migrate --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 - \ No newline at end of file +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 \ No newline at end of file