From 99f6dfcdfb932f256ed24711ccf4db75c11dd55d Mon Sep 17 00:00:00 2001 From: Christian Merten Date: Mon, 28 Jul 2025 22:34:07 +0200 Subject: [PATCH] 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. --- docker/production/entrypoint-master.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/production/entrypoint-master.sh b/docker/production/entrypoint-master.sh index 3ecdd40..a6ba638 100755 --- a/docker/production/entrypoint-master.sh +++ b/docker/production/entrypoint-master.sh @@ -16,6 +16,7 @@ if ! [ -f completed_initial_run ]; then python jdav_web/manage.py compilemessages --locale de python jdav_web/manage.py migrate + python jdav_web/manage.py ensuresuperuser touch completed_initial_run fi