-
Notifications
You must be signed in to change notification settings - Fork 2
feat(supabase): unify 4 runtimes into single canonical compose stack #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
98f2d74
1cbc916
8d324f2
a3bc7ac
d93aa29
ca92a7a
6639f75
d4bc8ec
e4b9343
3f32641
3291b27
caab0d8
071e6f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # TAC Tree Review | ||
|
|
||
| Run a TAC (Task-Action-Context) tree audit for an integration submodule. | ||
|
|
||
| ## Usage | ||
| Accepts a submodule name or tree path as argument: | ||
| - `/tac:review health-wger` — Review health integration | ||
| - `/tac:review firefly-iii` — Review wealth integration | ||
| - `/tac:review n8n` — Review n8n workflows | ||
| - `/tac:review pmoves/configs/tac_trees/custom.tac.yaml` — Custom tree | ||
|
|
||
| ## Instructions | ||
|
|
||
| 1. Resolve the argument to a TAC tree path: | ||
| - If arg matches a known name (`health-wger`, `firefly-iii`, `n8n`), map to `pmoves/configs/tac_trees/<name>.tac.yaml` | ||
| - If arg is a file path, use directly | ||
| - If no arg provided, list available trees in `pmoves/configs/tac_trees/` | ||
|
|
||
| 2. Run the TAC runner in text mode: | ||
| ```bash | ||
| python pmoves/tools/tac_runner.py --format text <tree-path> | ||
| ``` | ||
|
|
||
| 3. Also run in JSON mode for structured analysis: | ||
| ```bash | ||
| python pmoves/tools/tac_runner.py <tree-path> | ||
| ``` | ||
|
|
||
| 4. Present results to the user with: | ||
| - Overall pass/fail summary | ||
| - Each failing node with its `agent_hint` (who should fix it) | ||
| - Suggested next actions for each failure | ||
| - If all pass, confirm the integration is audit-clean | ||
|
|
||
| 5. For failing nodes, offer to fix them: | ||
| - `file_exists` failures → offer to create the missing file | ||
| - `grep` failures → offer to add the missing content | ||
| - `manual` items → flag for user review | ||
|
|
||
| ## Agent Assignment Hints | ||
| Each TAC node includes an `agent_hint` field suggesting which agent should handle the fix: | ||
| - `codex` — Claude Code CLI (documentation, config, scripts) | ||
| - `archon` — Archon agent (Supabase, prompts) | ||
| - `tokenism` — CHIT encoding | ||
| - `n8n` — n8n workflow creation | ||
|
|
||
| $ARGUMENTS |
| +107 −25 | pmoves_announcer/__init__.py | |
| +2 −1 | pmoves_common/__init__.py |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,7 +311,7 @@ supa-start: check-tools ensure-env-shared ## Start Supabase stack for selected r | |
| -e KONG_PG_USER=$${SUPABASE_DB_USER:-postgres} \ | ||
| -e KONG_PG_PASSWORD=$${SUPABASE_DB_PASSWORD:-postgres} \ | ||
| kong:3.7.1 kong migrations bootstrap --yes >/dev/null 2>&1 || true; \ | ||
| $(DC) up -d supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio; \ | ||
| $(DC) up -d supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler; \ | ||
| fi | ||
| @$(MAKE) --no-print-directory supa-status | ||
| @$(MAKE) --no-print-directory supa-collation-refresh 2>/dev/null || true | ||
|
|
@@ -321,14 +321,14 @@ supa-stop: ## Stop Supabase stack for selected runtime | |
| @if [ "$(SUPABASE_RUNTIME)" = "cli" ]; then \ | ||
| supabase stop --workdir "." >/dev/null 2>&1 || true; \ | ||
| else \ | ||
| $(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio >/dev/null 2>&1 || true; \ | ||
| $(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler >/dev/null 2>&1 || true; \ | ||
| fi | ||
| @echo "✅ Supabase stopped" | ||
|
|
||
| supa-stop-all: ## Stop both Supabase runtimes (CLI and compose) to clear mixed-state drift | ||
| @echo "🛑 Stopping all Supabase runtimes..." | ||
| @supabase stop --workdir "." >/dev/null 2>&1 || true | ||
| @$(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio >/dev/null 2>&1 || true | ||
| @$(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler >/dev/null 2>&1 || true | ||
| @echo "✅ All Supabase runtimes stopped" | ||
|
|
||
| supa-restart: ## Restart Supabase stack for selected runtime | ||
|
|
@@ -384,7 +384,7 @@ supa-status: ## Show Supabase status for selected runtime and export env snapsho | |
| echo " Auth: $$auth_url"; \ | ||
| echo " Studio: $$studio_url"; \ | ||
| else \ | ||
| $(DC) ps supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio 2>/dev/null || true; \ | ||
| $(DC) ps supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler 2>/dev/null || true; \ | ||
| echo ""; \ | ||
| echo "Expected local endpoints:"; \ | ||
| echo " PostgREST: http://localhost:$${SUPABASE_POSTGREST_PORT:-3000}"; \ | ||
|
|
@@ -412,7 +412,7 @@ supa-logs: ## Tail logs for selected runtime (set SVC=<container/service> for a | |
| docker logs --tail=80 "$$c" || true; \ | ||
| done; \ | ||
| else \ | ||
| $(DC) logs --tail=120 supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio || true; \ | ||
| $(DC) logs --tail=120 supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler || true; \ | ||
| fi | ||
|
|
||
| supa-health: ## Health checks for selected runtime + active DB container readiness | ||
|
|
@@ -630,21 +630,15 @@ else | |
| endif | ||
| @$(MAKE) --no-print-directory auth-check | ||
|
|
||
| supabase-up: ## Compose fallback only: start gotrue/realtime/storage/studio sidecars | ||
| @if [ "$(SUPABASE_RUNTIME)" != "compose" ] && [ "$(SUPA_PROVIDER)" != "compose" ]; then \ | ||
| echo "↷ SUPABASE_RUNTIME=$(SUPABASE_RUNTIME) (compose fallback skipped)"; \ | ||
| exit 0; \ | ||
| fi | ||
| @$(DC) -f docker-compose.supabase.yml up -d gotrue realtime storage studio | ||
| @echo "✅ Compose Supabase sidecars started (fallback mode)" | ||
| supabase-up: ## Alias for up-supabase (shim removed — all services in main compose) | ||
| @$(MAKE) --no-print-directory up-supabase | ||
|
|
||
| supabase-stop: ## Compose fallback only: stop gotrue/realtime/storage/studio sidecars | ||
| @$(DC) -f docker-compose.supabase.yml stop gotrue realtime storage studio >/dev/null 2>&1 || true | ||
| @echo "✅ Compose Supabase sidecars stopped" | ||
| supabase-stop: ## Alias for supa-stop (shim removed — all services in main compose) | ||
| @$(MAKE) --no-print-directory supa-stop | ||
|
|
||
| supabase-clean: ## Compose fallback only: remove gotrue/realtime/storage/studio containers + volumes | ||
| @$(DC) -f docker-compose.supabase.yml down -v --remove-orphans >/dev/null 2>&1 || true | ||
| @echo "✅ Compose Supabase sidecars cleaned" | ||
| supabase-clean: ## Stop + remove Supabase containers and volumes | ||
| @$(DC) --profile supabase-local down -v --remove-orphans >/dev/null 2>&1 || true | ||
| @echo "✅ Supabase stack cleaned" | ||
|
|
||
| .PHONY: neo4j-bootstrap | ||
| neo4j-bootstrap: ## Seed Neo4j with persona aliases + CHIT geometry fixtures | ||
|
|
@@ -1041,7 +1035,7 @@ down-supabase: ## Stop Supabase | |
| @if [ "$(SUPABASE_RUNTIME)" = "cli" ]; then \ | ||
| supabase stop --workdir "$(CURDIR)" >/dev/null 2>&1 || true; \ | ||
| else \ | ||
| $(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio >/dev/null 2>&1 || true; \ | ||
| $(DC) stop supabase-db supabase-postgrest supabase-gotrue supabase-kong supabase-realtime supabase-storage supabase-studio supabase-imgproxy supabase-meta supabase-edge-functions supabase-analytics supabase-vector supabase-pooler >/dev/null 2>&1 || true; \ | ||
| fi | ||
|
|
||
| # ============================================================================= | ||
|
|
@@ -1316,15 +1310,17 @@ populate-tier-envs: bootstrap-tier-envs ## Populate tier env files with defaults | |
| echo "✓ Populated env.tier-data"; \ | ||
| fi; \ | ||
| if [ -f "env.tier-supabase" ]; then \ | ||
| sed -i "s|^SUPABASE_JWT_SECRET=.*|SUPABASE_JWT_SECRET=$${SUPABASE_JWT_SECRET:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_ANON_KEY=.*|SUPABASE_ANON_KEY=$${SUPABASE_ANON_KEY:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_SERVICE_ROLE_KEY=.*|SUPABASE_SERVICE_ROLE_KEY=$${SUPABASE_SERVICE_ROLE_KEY:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_PUBLISHABLE_KEY=.*|SUPABASE_PUBLISHABLE_KEY=$${SUPABASE_PUBLISHABLE_KEY:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_SECRET_KEY=.*|SUPABASE_SECRET_KEY=$${SUPABASE_SECRET_KEY:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_REALTIME_SECRET=.*|SUPABASE_REALTIME_SECRET=$${SUPABASE_REALTIME_SECRET:-$(shell openssl rand -base64 32)}|" env.tier-supabase; \ | ||
| sed -i "s|^SUPABASE_DB_PASSWORD=.*|SUPABASE_DB_PASSWORD=$${SUPABASE_DB_PASSWORD:-$(shell openssl rand -base64 24)}|" env.tier-supabase; \ | ||
| sed -i "s|^POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$${POSTGRES_PASSWORD:-$(shell openssl rand -base64 24)}|" env.tier-supabase; \ | ||
| echo "✓ Populated env.tier-supabase"; \ | ||
| if grep -q "your_jwt_secret_here\|your_anon_key_here\|your_service_role_key_here" env.tier-supabase 2>/dev/null; then \ | ||
| echo "Generating Supabase secrets with proper JWT tokens..."; \ | ||
| if [ -x scripts/supabase/generate-keys.sh ]; then \ | ||
| scripts/supabase/generate-keys.sh > env.tier-supabase; \ | ||
| echo "✓ Populated env.tier-supabase (via generate-keys.sh with valid JWTs)"; \ | ||
| else \ | ||
| echo "⚠ scripts/supabase/generate-keys.sh not found — run 'make supa-init' to generate proper JWT keys"; \ | ||
| fi; \ | ||
| else \ | ||
| echo "✓ env.tier-supabase already has real values, skipping"; \ | ||
| fi; \ | ||
|
Comment on lines
+1313
to
+1323
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Supabase placeholder probe won't repair upgraded env files. This branch only looks for the old JWT/anon/service placeholders. An existing 🤖 Prompt for AI Agents |
||
| fi; \ | ||
| if [ -f "env.tier-api" ]; then \ | ||
| sed -i "s|^POSTGRES_PASSWORD=.*|POSTGRES_PASSWORD=$${POSTGRES_PASSWORD:-$(shell openssl rand -base64 24)}|" env.tier-api; \ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 167
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 2625
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 2938
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 724
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 2546
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 2281
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 740
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 808
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 49
🌐 Web query:
Docker Compose profile behavior default services no profile💡 Result:
profiles:key are “default” services: if you rundocker compose upwithout--profile(and withoutCOMPOSE_PROFILES), Compose includes all services that have no profiles and excludes services that do declare profiles. [1][2]docker compose --profile <name> up, Compose starts the default (no-profile) services plus the services in the enabled profile(s). [1][2]docker compose up myprofiledserviceruns that service even if you didn’t enable its profile (Compose treats the service’s profile as active for that run). [1][2]depends_ona service that’s excluded by an inactive profile, the resulting model can be invalid (i.e., you must enable whatever profiles are needed to satisfydepends_on, or restructure). [2]Sources: Docker Compose profiles docs. [1][2]
🏁 Script executed:
Repository: POWERFULMOVES/PMOVES.AI
Length of output: 2095
supabase-cleantears down the entire stack, not just Supabase.Services with no profile (qdrant, neo4j, meilisearch, nats, minio, hi-rag-gateway, tensorzero-gateway, and others) are default services that are always included when
docker compose downruns. The--profile supabase-localflag activates the Supabase profile but does not exclude default services—it activates the profile in addition to running all unprofiled services. Therefore,$(DC) --profile supabase-local down -v --remove-orphanswill stop and remove both the 13 Supabase services and the 19 core infrastructure services.Use a separate compose file or an explicit service list instead of relying on the profile to isolate the target.
🤖 Prompt for AI Agents