From f149217e2afc790c1b939d43b1ab66733ea9b062 Mon Sep 17 00:00:00 2001 From: hzmi Date: Thu, 10 Oct 2024 22:18:05 +0700 Subject: [PATCH] fix(initdb): fix if POSTGRES_USER var doesn't exists --- initdb/999_alter_owner_temp_revert.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/initdb/999_alter_owner_temp_revert.sh b/initdb/999_alter_owner_temp_revert.sh index e8632c3..ac465e3 100755 --- a/initdb/999_alter_owner_temp_revert.sh +++ b/initdb/999_alter_owner_temp_revert.sh @@ -8,6 +8,10 @@ if [ -z "${POSTGRESQL_POSTGRES_PASSWORD:-}" ]; then POSTGRESQL_POSTGRES_PASSWORD=${POSTGRES_POSTGRES_PASSWORD:-} fi +if [ -z "${POSTGRES_USER:-}" ]; then + POSTGRES_USER="postgres" +fi + export PGPASSWORD="$POSTGRESQL_POSTGRES_PASSWORD" if [ $POSTGRES_USER != "postgres" ]; then