Makefile: add seed-demo-tenants target (non-destructive API seeder)

This commit is contained in:
Raphaël MANSUY 2025-12-05 13:18:24 +08:00
parent b69214e21b
commit 61fb783f8f

View file

@ -52,6 +52,7 @@ help:
@echo " $(YELLOW)make lint$(NC) Run linters"
@echo " $(YELLOW)make reset-demo-tenants$(NC) Reset DB + initialize 2 demo tenants (non-interactive)"
@echo " $(YELLOW)make reset-demo-tenants-dry-run$(NC) Preview the reset-demo-tenants workflow without executing it"
@echo " $(YELLOW)make seed-demo-tenants$(NC) Seed (non-destructive) the demo tenants via the API script"
@echo ""
@echo "$(GREEN)$(BOLD)📡 Service URLs (when running):$(NC)"
@echo " • WebUI: $(BLUE)http://localhost:5173$(NC)"
@ -167,6 +168,13 @@ reset-demo-tenants-dry-run:
@echo ""
@echo "Run 'make reset-demo-tenants' to actually perform the reset and seeding (destructive)."
# Run only the API-side seeding script (non-destructive, does not drop DB)
.PHONY: seed-demo-tenants
seed-demo-tenants:
@echo "$(BLUE)⤴️ Seeding demo tenants via API (non-destructive)$(NC)"
@echo "→ This will call: python3 scripts/init_demo_tenants.py"
@python3 scripts/init_demo_tenants.py || echo "$(YELLOW)⚠ Seed script failed — check API accessibility or logs.$(NC)"
# ============================================================================
# SETUP & UTILITIES
# ============================================================================