11 Commits
Author SHA1 Message Date
9ef9f1b8c1 feat(self-host): use @supabase/server in functions template and docs (#48996)
Updates the self-host Edge Functions template to use `@supabase/server`,
matching the CLI's `supabase functions new` templates (part of SDK-1150,
follows up on #45635 which exposed `SUPABASE_JWKS` to the functions
container). The `hello` example function now wraps its handler in
`withSupabase({ auth: 'none' })` and resolves the package through a
per-function `deno.json` import map, which the runtime auto-discovers,
so no dispatcher changes are needed. The self-hosted functions guide is
updated to match: the create-a-function snippet, a `ctx.supabaseAdmin`
example replacing the manual esm.sh `createClient` wiring, and a note
that `auth: 'user'` requires `SUPABASE_JWKS`. Verified on
`supabase/edge-runtime:v1.74.0` with the compose environment variables:
`curl /functions/v1/hello` returns the same response body as before, so
existing docs and troubleshooting pages stay accurate.

The `docker/.gitignore` change: `volumes/functions/**` ignores
self-hosters' own functions, but it also hid the new `deno.json`, which
must ship with the repo for the `hello` import to resolve. The allowlist
entries follow the existing `main/index.ts` pattern.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Edge Functions now support authenticated invocation with publishable
or secret API keys.
* Function handlers can access authenticated and administrative Supabase
clients through the request context.
* Added automatic environment configuration and JWT verification
support.

* **Documentation**
* Updated the self-hosting guide with the new function setup and
authentication workflow.
* Improved local function examples for supported access patterns and
privileged operations.

* **Tests**
* Updated self-hosted smoke tests to validate publishable-key function
access.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Kalleby Santos <kalleby_santos@hotmail.com>
Co-authored-by: Kalleby Santos <105971119+kallebysantos@users.noreply.github.com>
2026-08-14 12:00:11 +03:00
Andrey A. 9e73d556d0 feat(self-hosted): add update script (#47851) 2026-08-03 17:05:11 +02:00
Andrey A. be136df69e feat(self-hosted): use latest tag in setup.sh plus additional checks (#47848) 2026-07-31 13:43:35 +02:00
Ruggero Tomaselli fb846dcf06 Add docker-compose-ovveride.yml to .gitignore 2023-02-20 16:05:18 +08:00
Han Qiao eae6905d42 chore: update self hosted to use latest postgres image (#9973)
* chore: remove outdated migration files

* chore: update docker compose to use latest images

* chore: remove commented lines

* chore: update default role passwords

* chore: add no restart flag in dev

* chore: update example env

* chore: add comments

* chore: bump storage and studio images

* chore: default pgmeta to use admin role

* chore: do not update su role
2022-11-01 12:26:12 +08:00
Copple 86941e972a hides mounted file 2021-11-25 19:58:08 +08:00
Bobbie Soedirgo 6511fcc4ca fix(docker): revert self host volumes change (#4011)
* fix(docker): revert self host volumes change

* chore(docker): update images

* chore(docker): pg-meta -> meta
2021-11-24 08:12:39 +08:00
Copple 663490876e makeing our mount setup far more robust (#3995) 2021-11-22 17:08:21 +08:00
Bobbie Soedirgo f4a1b5ac69 formatting 2021-11-10 19:15:00 +08:00
Copple e029b816a1 hide test files 2021-11-10 19:15:00 +08:00
Bobbie Soedirgo 0e036d4948 chore: update self-host setup 2021-09-30 07:30:40 +08:00