This commit is contained in:
Bernhard Radermacher
2026-03-20 08:12:07 +01:00
parent 4c37f529fe
commit cfff7b5ff7

View File

@@ -72,7 +72,7 @@ pg_setup_hba_conf() {
printf 'host replication %s %s trust\n' "$POSTGRES_PGPOOL_USERNAME" "${POSTGRES_NETWORK:-100.64.0.0/10}" printf 'host replication %s %s trust\n' "$POSTGRES_PGPOOL_USERNAME" "${POSTGRES_NETWORK:-100.64.0.0/10}"
fi fi
printf '\n' printf '\n'
printf 'host all all all scram-sha-256' printf 'host all all all scram-sha-256\n'
} >> "$PGDATA/pg_hba.conf" } >> "$PGDATA/pg_hba.conf"
} }
@@ -88,6 +88,7 @@ docker_setup_env
if [[ ! -s "$PGDATA/PG_VERSION" ]]; then if [[ ! -s "$PGDATA/PG_VERSION" ]]; then
if [[ -z $POSTGRES_UPSTREAM ]] || [[ -z $POSTGRES_REPLICATOR_USERNAME ]]; then if [[ -z $POSTGRES_UPSTREAM ]] || [[ -z $POSTGRES_REPLICATOR_USERNAME ]]; then
echo ${POSTGRES_PASSWORD}
initdb --username=postgres --pwfile=<(printf "%s\n" "${POSTGRES_PASSWORD}") initdb --username=postgres --pwfile=<(printf "%s\n" "${POSTGRES_PASSWORD}")
pg_setup_conf pg_setup_conf
pg_setup_hba_conf pg_setup_hba_conf