Supabase
Pin supabase/postgres as store.sql — extension bundle (pgvector, …) without Auth, Storage, Realtime, or Studio.
Supabase publishes supabase/postgres — plain Postgres with a bundled extension set
(pgvector, pg_graphql, pg_cron, wrappers, and more). oke docker matches that
image ahead of the generic Postgres recipe.
Not the full Supabase platform
This recipe does not start GoTrue, PostgREST, Kong, Realtime, Storage, or Studio. Auth, files, and realtime delivery are already covered by Vault, Store · files, and Signal.
Quick start
Pin the image
images: {
"store.sql": "supabase/postgres:15.8.1.049", // pin a real tag from Supabase's registry
},Same env shape as Postgres
oke docker injects the same POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB
refs from OKE_STORE_SQL_*. Driver id stays postgres.
Use pgvector when you need it
drivers: {
store: {
index: { test: "memory", prod: "pgvector" },
},
},CREATE EXTENSION IF NOT EXISTS vector runs when the pgvector index driver opens —
the extension ships in this image.
Required env
| Variable | Meaning |
|---|---|
OKE_STORE_SQL_USER | → POSTGRES_USER |
OKE_STORE_SQL_PASSWORD | → POSTGRES_PASSWORD |
OKE_STORE_SQL_DB | → POSTGRES_DB |
DATABASE_URL | App connection (postgres://…:5432/…) |
PGDATA | Default /var/lib/postgresql/data/pgdata |
Identical credential contract to Postgres — only the image (and its extension bundle) differs.
Data and backup
| Path | What lives there |
|---|---|
$PGDATA | Cluster data, including extension catalogs |
Image VOLUME /var/lib/postgresql/data | Persistence mount |
Same backup story as plain Postgres: pg_dump or volume backup of
/var/lib/postgresql/data. Losing that volume loses tables and which extensions
were created.
Production note
Want managed Supabase (Auth / Storage / Realtime included)? Use the
Supabase provider and set DATABASE_URL — do not run this
image and the cloud project as if they were the same deployment.
For self-hosted production, prefer a pinned tag (not latest) and the same
shared-store guidance as Postgres. Free-tier
cloud pausing does not apply to this Docker image — you own uptime.
What the recipe configures
| Field | Value |
|---|---|
| Match | supabase/postgres before generic postgres |
| Container port | 5432 |
| Healthcheck | pg_isready -U $POSTGRES_USER, every 5s, 10 retries |
| Connection URL | postgres://user:pass@host:5432/db |
| Preload | Image config — recipe does not set command |
Query performance
Do not overwrite command
supabase/postgres already preloads pg_stat_statements. This recipe leaves command unset so
vendor startup stays intact.
| Step | What you do |
|---|---|
| Preload | Image postgresql.conf (not an oke command) |
| Create | CREATE EXTENSION IF NOT EXISTS pg_stat_statements |
| Advisor | CREATE EXTENSION IF NOT EXISTS index_advisor CASCADE when listed |
Console Performance then reads engine stats. Enable Index Advisor from the
same view when pg_available_extensions lists it.
Troubleshooting
Do not replace the image entrypoint with a generic postgres -c shared_preload_libraries=pg_stat_statements. Restore the vendor command, create
the extension, then open Store → Performance.
You pinned a plain postgres: image, not supabase/postgres, or the tag predates the
bundle. Confirm the image reference contains supabase/postgres, then re-derive.
With the right image, CREATE EXTENSION vector succeeds without a separate install.
Those services are not part of this recipe. Use the managed Supabase provider for the full platform, or oke's own Vault / Store · files / Signal for those concerns.
Learn more
- Supabase (provider) — managed cloud alternative
- Postgres — generic recipe this one takes precedence over
- Store · Index —
pgvector-backed vector search