++ 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:
@@ -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
|
||||
# -----------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user