Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ services:
JWT_EXP: 3600
volumes:
- db_data:/var/lib/postgresql/data
- ./supabase/roles.sql:/docker-entrypoint-initdb.d/zz-roles.sql:ro
- ./docker/db-init/roles.sql:/docker-entrypoint-initdb.d/zz-roles.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
Expand Down
3 changes: 3 additions & 0 deletions supabase/roles.sql → docker/db-init/roles.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
-- Runs once on first DB init (after the supabase/postgres image creates its
-- base roles). Guarantees GoTrue and PostgREST can log in with POSTGRES_PASSWORD.
-- ponytail: only forces the two login passwords; everything else the image sets up.
-- Must NOT live under supabase/ — the Supabase CLI seeds supabase/roles.sql on
-- `supabase start` as a non-superuser, where altering supabase_auth_admin is
-- rejected as a reserved role (42501). Here it runs as the init superuser.
do $$
begin
if exists (select from pg_roles where rolname = 'supabase_auth_admin') then
Expand Down