mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-24 08:26:43 +02:00
create the second_run file inside the container
This commit is contained in:
parent
f692fce446
commit
74b7cfd3bd
5
run.sh
5
run.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
if [ -f ./.second_run ]; then
|
||||
if [ -f /var/cache/network_inventory/.second_run ]; then
|
||||
sleep 2
|
||||
python manage.py collectstatic --noinput
|
||||
python manage.py makemigrations
|
||||
|
@ -24,7 +24,8 @@ else
|
|||
python manage.py loaddata nets
|
||||
python manage.py loaddata softwares
|
||||
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
|
||||
mkdir -p /var/cache/network_inventory
|
||||
touch /var/cache/network_inventory/.second_run
|
||||
fi
|
||||
find . \( -name __pycache__ -o -name "*.pyc" \) -delete
|
||||
gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
|
||||
|
|
Loading…
Reference in New Issue
Block a user