Files
codexpi/scripts/create-admin.sh

7 lines
266 B
Bash
Raw Normal View History

2026-11-14 20:23:59 +01:00
#!/usr/bin/env bash
set -euo pipefail
BASE="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
if [[ "$(id -u)" == "0" ]]; then echo "Ne créez pas l'admin en root." >&2; exit 1; fi
cd "$BASE"
exec docker compose run --rm django-web python3 manage.py createsuperuser