use gunicorn in the run.sh script and remove production.sh
This commit is contained in:
parent
c7d35a6420
commit
63fedf93c2
|
@ -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
3
run.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue