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

This commit is contained in:
Andreas Zweili 2020-02-15 15:31:57 +01:00
parent c7d35a6420
commit 63fedf93c2
2 changed files with 2 additions and 15 deletions

View File

@ -1,14 +0,0 @@
#!/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,4 +24,5 @@ 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
python manage.py runserver 0.0.0.0:8000
gunicorn network_inventory.wsgi:application --bind 0.0.0.0:8000 --workers 3