diff --git a/sample_project/entrypoint.sh b/sample_project/entrypoint.sh index 2b40c9ff4..9d3244001 100755 --- a/sample_project/entrypoint.sh +++ b/sample_project/entrypoint.sh @@ -3,4 +3,8 @@ /app/manage.py migrate /app/manage.py setup || true /app/manage.py loaddata sample_project --settings=sample_project.settings_loaddata +if [ -n "${DJANGO_SUPERUSER_PASSWORD+x}" ]; then + echo "Creating adchadmin user with password $DJANGO_SUPERUSER_PASSWORD" + /app/manage.py createsuperuser --email acdhadmin@discworld.acdh-ch-dev.oeaw.ac.at --user acdhadmin --noinput +fi /app/manage.py runserver 0.0.0.0:5000