ISO-27001-Risk-Management/entrypoint.sh

16 lines
No EOL
362 B
Bash

#!/bin/sh
set -e
export DJANGO_SETTINGS_MODULE=config.settings
echo "Running migrations..."
python manage.py migrate --noinput
echo "Creating superuser if it doesn't exist..."
python manage.py createsuperuser \
--noinput \
--username "${DJANGO_SUPERUSER_USERNAME}" \
--email "${DJANGO_SUPERUSER_EMAIL}" || true
echo "Starting server..."
exec "$@"