Files
AdNova/services/backend/scripts/initdb
T
2025-07-24 16:57:47 +03:00

15 lines
351 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_cache
python manage.py silk_clear_request_log