Revert "use gunicorn in the run.sh script and remove production.sh"

This reverts commit 63fedf93c2.
This commit is contained in:
Andreas Zweili 2020-02-16 10:17:34 +01:00
parent 171d445e2b
commit 72831376e4
2 changed files with 15 additions and 2 deletions

14
production.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
if [ -f ./.second_run ]; then
python manage.py makemigrations
python manage.py migrate
else
python manage.py makemigrations inventory
python manage.py makemigrations
python manage.py migrate
python manage.py loaddata inventory
python manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
touch .second_run
fi
gunicorn network_inventory.wsgi:application --bind 0.0.0.0:8000 --workers 3

3
run.sh
View File

@ -24,5 +24,4 @@ else
python manage.py shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
touch .second_run
fi
gunicorn network_inventory.wsgi:application --bind 0.0.0.0:8000 --workers 3
python manage.py runserver 0.0.0.0:8000