mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-07-01 05:30:57 +02:00
14 lines
496 B
Bash
14 lines
496 B
Bash
|
#!/bin/bash
|
||
|
if [ -f ./.second_run ]; then
|
||
|
python manage.py makemigrations
|
||
|
python manage.py migrate
|
||
|
else
|
||
|
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
|