++ fix: update .env.example and README.md, add CreateInitialAdmin command, update docker-compose.yml and entrypoint.sh, remove old CSS file and update manifest.json

This commit is contained in:
2026-04-07 14:10:52 +00:00
parent 80318d33b4
commit 1010246104
7 changed files with 114 additions and 9 deletions

View File

@@ -176,6 +176,21 @@ else
echo "[i] RUN_DB_SEED_ON_FIRST_START=false, skipping automatic seed."
fi
# -----------------------------------------------
# 7c. Ensure initial admin exists (first startup)
# -----------------------------------------------
ENSURE_INITIAL_ADMIN_ON_EMPTY_DB="${ENSURE_INITIAL_ADMIN_ON_EMPTY_DB:-true}"
if [ "$ENSURE_INITIAL_ADMIN_ON_EMPTY_DB" = "true" ]; then
echo "[*] Ensuring initial administrator account..."
if ! php artisan app:create-initial-admin --from-env --no-interaction; then
warn "Initial admin creation failed. Set INITIAL_ADMIN_NAME, INITIAL_ADMIN_EMAIL and INITIAL_ADMIN_PASSWORD."
exit 1
fi
else
echo "[i] ENSURE_INITIAL_ADMIN_ON_EMPTY_DB=false, skipping initial admin creation check."
fi
# -----------------------------------------------
# 8. Cache config/routes/views
# -----------------------------------------------