🐳 Change to the actual workdir
This commit is contained in:
parent
822350d666
commit
ab0c255040
2 changed files with 6 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
|||
set -e
|
||||
|
||||
# run db migrations (retry on error)
|
||||
while ! /opt/netbox/netbox/manage.py migrate 2>&1; do
|
||||
while ! ./manage.py migrate 2>&1; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
|
@ -14,14 +14,14 @@ if [[ -z ${SUPERUSER_NAME} || -z ${SUPERUSER_EMAIL} || -z ${SUPERUSER_PASSWORD}
|
|||
echo "Using defaults: Username: ${SUPERUSER_NAME}, E-Mail: ${SUPERUSER_EMAIL}, Password: ${SUPERUSER_PASSWORD}"
|
||||
fi
|
||||
|
||||
python netbox/manage.py shell --plain << END
|
||||
./manage.py shell --plain << END
|
||||
from django.contrib.auth.models import User
|
||||
if not User.objects.filter(username='${SUPERUSER_NAME}'):
|
||||
User.objects.create_superuser('${SUPERUSER_NAME}', '${SUPERUSER_EMAIL}', '${SUPERUSER_PASSWORD}')
|
||||
END
|
||||
|
||||
# copy static files
|
||||
/opt/netbox/netbox/manage.py collectstatic --no-input
|
||||
./manage.py collectstatic --no-input
|
||||
|
||||
# start unicorn
|
||||
gunicorn --log-level debug --debug -c /opt/netbox/gunicorn_config.py netbox.wsgi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue