This stack provides a lightweight Supabase-style local foundation using PostgreSQL and PostgREST for instant REST APIs on top of PostgreSQL.
flowchart LR
App([Application]) -->|:8000 REST| PostgREST[PostgREST]
PostgREST --> PG[(PostgreSQL :5433)]
Admin([Admin]) -->|:5050| pgAdmin[pgAdmin UI]
pgAdmin --> PG
supabase-dbruns PostgreSQL.supabase-rest(PostgREST) auto-generates REST endpoints from your database schema.supabase-ui(pgAdmin) provides a web UI for browsing and managing PostgreSQL.- You connect apps to Postgres directly or use REST endpoints from PostgREST.
- Services:
supabase-db(postgres:16)supabase-rest(postgrest/postgrest:v12.2.3)supabase-ui(dpage/pgadmin4:latest)
- Ports:
- Postgres:
localhost:5433 - REST API:
http://localhost:8000 - Web UI (pgAdmin):
http://localhost:5050
- Postgres:
- Persistent data:
supabase_db_data:/var/lib/postgresql/datasupabase_ui_data:/var/lib/pgadmin
Set via .env (copy from .env.example):
SUPABASE_DB_PORTSUPABASE_DB_NAMESUPABASE_DB_USERSUPABASE_DB_PASSWORDSUPABASE_REST_PORTSUPABASE_DB_SCHEMASSUPABASE_ANON_ROLESUPABASE_JWT_SECRETSUPABASE_UI_PORTSUPABASE_UI_EMAILSUPABASE_UI_PASSWORD
From the repository root:
cd supabase
cp .env.example .env
docker compose up -dOpen:
- REST root:
http://localhost:8000 - Web UI:
http://localhost:5050
- Sign in with:
- Email: value of
SUPABASE_UI_EMAIL - Password: value of
SUPABASE_UI_PASSWORD
- Email: value of
- Add server connection in pgAdmin:
- Host:
supabase-db - Port:
5432 - Username: value of
SUPABASE_DB_USER - Password: value of
SUPABASE_DB_PASSWORD - Database: value of
SUPABASE_DB_NAME
- Host:
Useful commands:
docker compose ps
docker compose logs -f
docker compose down
docker compose down -v- This is a lightweight Supabase-compatible starter, not the full official Supabase platform bundle.
- Create an
anonDB role (or changeSUPABASE_ANON_ROLE) before exposing REST endpoints to client apps.