Makefile: add reset-demo-tenants target (non-interactive DB reset + demo tenant seed)
This commit is contained in:
parent
0f7b8ff0a3
commit
afde907a5c
1 changed files with 10 additions and 0 deletions
10
Makefile
10
Makefile
|
|
@ -50,6 +50,7 @@ help:
|
|||
@echo " $(YELLOW)make install$(NC) Install Python + WebUI dependencies"
|
||||
@echo " $(YELLOW)make test$(NC) Run tests"
|
||||
@echo " $(YELLOW)make lint$(NC) Run linters"
|
||||
@echo " $(YELLOW)make reset-demo-tenants$(NC) Reset DB + initialize 2 demo tenants (non-interactive)"
|
||||
@echo ""
|
||||
@echo "$(GREEN)$(BOLD)📡 Service URLs (when running):$(NC)"
|
||||
@echo " • WebUI: $(BLUE)http://localhost:5173$(NC)"
|
||||
|
|
@ -143,6 +144,15 @@ clean-db:
|
|||
@docker compose -f docker-compose.dev-db.yml down -v
|
||||
@echo "$(GREEN)✓ Database volumes removed$(NC)"
|
||||
|
||||
# Reset the multi-tenant demo DB and seed it with two demo tenants
|
||||
.PHONY: reset-demo-tenants
|
||||
reset-demo-tenants:
|
||||
@echo "$(BLUE)🔁 Resetting demo database and provisioning demo tenants (non-interactive)$(NC)"
|
||||
@echo "→ This will DROP the demo database and recreate schema + demo data from 'starter' Makefile"
|
||||
@printf 'yes\n' | make -C starter db-reset
|
||||
@echo "→ Running API-side tenant initializer script (may wait for API to become available)"
|
||||
@python3 scripts/init_demo_tenants.py || echo "$(YELLOW)⚠ Demo initialization may have failed. Ensure API is running and try running 'python3 scripts/init_demo_tenants.py' manually.$(NC)"
|
||||
|
||||
# ============================================================================
|
||||
# SETUP & UTILITIES
|
||||
# ============================================================================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue