diff --git a/Makefile b/Makefile index 6b4414e..50fff78 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # The workspace root delegates to these (see ../Makefile). .PHONY: dev-utils dev dev-local dev-lan up down update install dev-backend dev-frontend \ - generate-client seed-example seed-demo seed-house seed-aircon seed-hosted-demo test test-backend test-frontend soak bench-startup lint lint-backend \ + generate-client seed-example seed-demo seed-house seed-aircon seed-tinyhouse seed-hosted-demo test test-backend test-frontend soak bench-startup lint lint-backend \ lint-frontend format-frontend umami build docs docs-serve clean help COMPOSE_ROOT := $(CURDIR) @@ -112,6 +112,17 @@ seed-house: ## Seed the house write-path rig (needs the real broker reachable) seed-aircon: ## Seed the aircon write-path rig (needs the unit reachable) cd backend && uv run python ../scripts/seed_aircon_control.py +# The house itself. Reads ../house.json for this installation's addresses and +# DMX wiring; everything it creates is published and stopped. ARGS=--dry checks +# the whole set without an installation and pushes nothing. +seed-tinyhouse: ## Seed the TinyHouse flows (ARGS=--dry to check only) + @user=$$(grep -E '^FIRST_SUPERUSER=' $(COMPOSE_ROOT)/.env 2>/dev/null | head -1 | cut -d= -f2-); \ + pass=$$(grep -E '^FIRST_SUPERUSER_PASSWORD=' $(COMPOSE_ROOT)/.env 2>/dev/null | head -1 | cut -d= -f2-); \ + cd backend && \ + FIRST_SUPERUSER="$${FIRST_SUPERUSER:-$$user}" \ + FIRST_SUPERUSER_PASSWORD="$${FIRST_SUPERUSER_PASSWORD:-$$pass}" \ + uv run python ../scripts/seed_tinyhouse.py $(ARGS) + # Operators of the hosted demo only — NOT part of any deployment, and nothing a # self-hosted instance needs. It wipes and recreates its three flows and its # dashboard, so re-running it is how the public demo is reset.