fix(docker): make all services depend on db-migrate completion
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:
@@ -83,6 +83,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
supabase-db:
|
supabase-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
supabase-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
environment:
|
environment:
|
||||||
GOTRUE_API_HOST: 0.0.0.0
|
GOTRUE_API_HOST: 0.0.0.0
|
||||||
GOTRUE_API_PORT: 9999
|
GOTRUE_API_PORT: 9999
|
||||||
@@ -123,6 +125,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
supabase-db:
|
supabase-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
supabase-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
environment:
|
environment:
|
||||||
PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@supabase-db:5432/postgres
|
PGRST_DB_URI: postgres://authenticator:${POSTGRES_PASSWORD}@supabase-db:5432/postgres
|
||||||
PGRST_DB_SCHEMAS: public,storage,graphql_public
|
PGRST_DB_SCHEMAS: public,storage,graphql_public
|
||||||
@@ -144,6 +148,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
supabase-db:
|
supabase-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
supabase-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
environment:
|
environment:
|
||||||
PORT: 4000
|
PORT: 4000
|
||||||
DB_HOST: supabase-db
|
DB_HOST: supabase-db
|
||||||
@@ -176,6 +182,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
supabase-db:
|
supabase-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
supabase-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
supabase-rest:
|
supabase-rest:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
supabase-imgproxy:
|
supabase-imgproxy:
|
||||||
@@ -222,6 +230,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
supabase-db:
|
supabase-db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
supabase-db-migrate:
|
||||||
|
condition: service_completed_successfully
|
||||||
environment:
|
environment:
|
||||||
PG_META_PORT: 8080
|
PG_META_PORT: 8080
|
||||||
PG_META_DB_HOST: supabase-db
|
PG_META_DB_HOST: supabase-db
|
||||||
|
|||||||
Reference in New Issue
Block a user