2019-07-13 12:37:58 +02:00
|
|
|
#!/bin/bash
|
2019-08-10 15:03:03 +02:00
|
|
|
if [ -f ./.second_run ]; then
|
2019-12-30 01:37:23 +01:00
|
|
|
sleep 2
|
2019-07-24 23:13:40 +02:00
|
|
|
python manage.py makemigrations
|
|
|
|
python manage.py migrate
|
|
|
|
else
|
2020-01-11 17:08:11 +01:00
|
|
|
python manage.py makemigrations backups
|
2020-01-12 14:36:44 +01:00
|
|
|
python manage.py makemigrations computers
|
2020-01-07 21:31:44 +01:00
|
|
|
python manage.py makemigrations core
|
2020-01-10 00:01:06 +01:00
|
|
|
python manage.py makemigrations customers
|
|
|
|
python manage.py makemigrations devices
|
2020-01-12 12:56:24 +01:00
|
|
|
python manage.py makemigrations licenses
|
2020-01-10 00:01:06 +01:00
|
|
|
python manage.py makemigrations nets
|
2020-01-11 18:32:03 +01:00
|
|
|
python manage.py makemigrations softwares
|
2020-01-10 00:01:06 +01:00
|
|
|
python manage.py makemigrations users
|
2019-07-24 23:13:40 +02:00
|
|
|
python manage.py makemigrations
|
|
|
|
python manage.py migrate
|
2020-01-11 17:08:11 +01:00
|
|
|
python manage.py loaddata backups
|
2020-01-12 14:36:44 +01:00
|
|
|
python manage.py loaddata computers
|
2020-01-07 22:20:07 +01:00
|
|
|
python manage.py loaddata core
|
2020-01-10 00:01:06 +01:00
|
|
|
python manage.py loaddata devices
|
|
|
|
python manage.py loaddata nets
|
2020-01-11 18:32:03 +01:00
|
|
|
python manage.py loaddata softwares
|
2019-07-24 23:13:40 +02:00
|
|
|
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')"
|
2019-08-10 15:03:03 +02:00
|
|
|
touch .second_run
|
2019-07-24 23:13:40 +02:00
|
|
|
fi
|
2020-02-16 10:20:03 +01:00
|
|
|
gunicorn network_inventory.wsgi:application --bind 0.0.0.0:8000 --workers 3
|