Files
DataRush/services/backend/scripts/initdb
T
Андрей Сумин 151d997eb5 Edit initdb
2025-03-03 07:44:29 +00:00

13 lines
316 B
Bash
Executable File

#!/bin/sh
python manage.py migrate
if [ $? -ne 0 ]; then
echo "Migration failed"
exit 1
fi
if [ "$DJANGO_CREATE_SUPERUSER" = "True" ]; then
python manage.py createsuperuser --noinput --username "$DJANGO_SUPERUSER_USERNAME" --email "$DJANGO_SUPERUSER_EMAIL" || true
fi
python manage.py init_achievments