diff --git a/.github/workflows/keepalive.yml b/.github/workflows/keepalive.yml index ab230d3..3855713 100644 --- a/.github/workflows/keepalive.yml +++ b/.github/workflows/keepalive.yml @@ -1,4 +1,5 @@ -# Free Supabase projects pause after a period of inactivity. Ping the REST API daily. +# Free Supabase projects pause after a period of inactivity. Read one row through the REST API daily. +# The bare /rest/v1/ root only answers secret keys now, so this reads a public feature flag instead. name: Keepalive on: @@ -21,4 +22,4 @@ jobs: curl --fail --silent --show-error --output /dev/null \ --retry 3 --retry-delay 10 \ -H "apikey: ${SUPABASE_PUBLISHABLE_KEY}" \ - "${SUPABASE_URL}/rest/v1/" + "${SUPABASE_URL}/rest/v1/app_config?select=key&limit=1" diff --git a/docs/adr/0002-supabase-backend-with-rls-authorization.md b/docs/adr/0002-supabase-backend-with-rls-authorization.md index 3c1f5ee..fe8cccc 100644 --- a/docs/adr/0002-supabase-backend-with-rls-authorization.md +++ b/docs/adr/0002-supabase-backend-with-rls-authorization.md @@ -24,5 +24,5 @@ Authorization lives in Postgres: - One place to audit. A rule written in SQL applies to the web app, the future native app and anyone poking the API with curl. - Policy mistakes are security bugs, so pgTAP coverage for RLS is not optional (see [testing.md](../testing.md)). - Business logic that spans rows has to be written in PL/pgSQL. That is a smaller hiring pool than TypeScript, and harder to debug. -- Free projects pause when idle. `keepalive.yml` pings the REST API daily. +- Free projects pause when idle. `keepalive.yml` reads one `app_config` row through the REST API daily. - Moving off Supabase would mean rebuilding auth, storage and realtime. The schema and RPCs are plain Postgres and would carry over.