1
Branching: declare pg_cron jobs and generated Vault secrets per branch in config.toml
Source: supabase/supabase#54372 · opened by @martijn00
Some database setup differs per branch and has no place in migrations, seeds or config.toml: which pg_cron jobs run, the Vault secrets they read, and the URLs they call with pg_net. Today it is SQL someone runs by hand on each branch, and again after every reset. Our case A multi-tenant app deploys main and a persistent develop branch. Production gets its background-job schedule from the hosting platform. The develop deployment gets no platform schedule, so the develop database calls a drain route every minute with pg_cron and pg_net, authenticated with a random bearer key it generates into Vault. Production must not run that job, and the key must differ per branch and never sit in a file. None of this can go in a migration or a seed, because migrations and seeds are the same on every branch (and production seeding is off). So the setup lives in a runbook: after each reset of develop, someone runs an idempotent snippet with vault.create_secret(...) and cron.schedule(...), and until…
No pledges yet. Be the first to back this.
Comments
Similar requests
Upgrade pg_cron to version 1.6
2 votes · 0 comments
Feature Request: Add Bitbucket Support for Supabase Branching
5 votes · 0 comments
Infrastructure as Code / config.toml for production
14 votes · 0 comments
Enable Syncing of Vault and Edge Function Secrets
1 vote · 0 comments
Feature request: let Postgres call its own Edge Functions on every branch, with no hand-copied URLs or keys
1 vote · 0 comments
No comments yet.