fix(docker): make all services depend on db-migrate completion
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 5m33s
Workflow / ⚫️ Test (push) Has been skipped

PostgREST, Auth, Realtime, Storage, and Meta were starting before db-migrate
set role passwords. On existing volumes (where initdb didn't re-run),
these services would fail to authenticate to Postgres. Now all services
wait for db-migrate to complete successfully before starting.
This commit is contained in:
Zaid Marzguioui
2026-03-31 18:15:58 +02:00
parent 5f3d23273c
commit a2aa5598b5

View File

@@ -83,6 +83,8 @@ services:
depends_on:
supabase-db:
condition: service_healthy
supabase-db-migrate:
condition: service_completed_successfully
environment:
GOTRUE_API_HOST: 0.0.0.0
GOTRUE_API_PORT: 9999
@@ -123,6 +125,8 @@ services:
depends_on:
supabase-db:
condition: service_healthy
supabase-db-migrate:
condition: service_completed_successfully
environment:
PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@supabase-db:5432/postgres
PGRST_DB_SCHEMAS: public,storage,graphql_public
@@ -144,6 +148,8 @@ services:
depends_on:
supabase-db:
condition: service_healthy
supabase-db-migrate:
condition: service_completed_successfully
environment:
PORT: 4000
DB_HOST: supabase-db
@@ -176,6 +182,8 @@ services:
depends_on:
supabase-db:
condition: service_healthy
supabase-db-migrate:
condition: service_completed_successfully
supabase-rest:
condition: service_started
supabase-imgproxy:
@@ -222,6 +230,8 @@ services:
depends_on:
supabase-db:
condition: service_healthy
supabase-db-migrate:
condition: service_completed_successfully
environment:
PG_META_PORT: 8080
PG_META_DB_HOST: supabase-db