feat(docker/production): create superuser in initial setup

We add one step to the master entrypoint script to ensure a
superuser exists with username and password configured from the
environment variables DJANGO_SUPERUSER_USERNAME and
DJANGO_SUPERUSER_PASSWORD. The step does nothing if these variables
are not set or the user already exists.
all-inclusive
Christian Merten 5 months ago
parent 7f203b5139
commit 99f6dfcdfb
Signed by: christian.merten
GPG Key ID: D953D69721B948B3

@ -16,6 +16,7 @@ if ! [ -f completed_initial_run ]; then
python jdav_web/manage.py compilemessages --locale de python jdav_web/manage.py compilemessages --locale de
python jdav_web/manage.py migrate python jdav_web/manage.py migrate
python jdav_web/manage.py ensuresuperuser
touch completed_initial_run touch completed_initial_run
fi fi

Loading…
Cancel
Save