Skip to content

Commit bc1b197

Browse files
committed
test
1 parent 4afe5f0 commit bc1b197

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docker/all-in-one/postgres-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ docker_setup_db() {
226226
docker_setup_env() {
227227
file_env 'POSTGRES_PASSWORD'
228228

229-
file_env 'POSTGRES_USER' 'postgres'
230-
file_env 'POSTGRES_DB' "$POSTGRES_USER"
229+
file_env 'POSTGRES_USER' 'supabase_admin'
230+
file_env 'POSTGRES_DB' 'postgres'
231231
file_env 'POSTGRES_INITDB_ARGS'
232232
: "${POSTGRES_HOST_AUTH_METHOD:=}"
233233

migrations/db/init-scripts/00000000000000-initial-schema.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
create publication supabase_realtime;
66

77
-- Supabase super admin
8-
create user supabase_admin;
98
alter user supabase_admin with superuser createdb createrole replication bypassrls;
109

1110
-- Supabase replication user

migrations/db/migrate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ set -eu
1313
# 0 if migration succeeds, non-zero on error.
1414
#######################################
1515

16+
psql -v ON_ERROR_STOP=1 --no-password --no-psqlrc -U supabase_admin -d postgres -c "create role postgres superuser login password '$POSTGRES_PASSWORD'"
17+
1618
export PGDATABASE="${POSTGRES_DB:-postgres}"
1719
export PGHOST="${POSTGRES_HOST:-localhost}"
1820
export PGPORT="${POSTGRES_PORT:-5432}"

0 commit comments

Comments
 (0)