diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh index 6e2391e1e4c4..fe7132691f0b 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh +++ b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/libpgbouncer.sh @@ -180,6 +180,7 @@ pgbouncer_initialize() { # Create credentials file if ! pgbouncer_is_file_external "userlist.txt"; then echo "\"$POSTGRESQL_USERNAME\" \"$POSTGRESQL_PASSWORD\"" >"$PGBOUNCER_AUTH_FILE" + echo "$PGBOUNCER_USERLIST" >>"$PGBOUNCER_AUTH_FILE" else debug "User list file mounted externally, skipping configuration" fi diff --git a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh index 3b5d10c111bf..722e7dae4125 100644 --- a/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh +++ b/bitnami/pgbouncer/1/debian-11/rootfs/opt/bitnami/scripts/pgbouncer-env.sh @@ -72,6 +72,7 @@ pgbouncer_env_vars=( POSTGRESQL_DATABASE POSTGRESQL_HOST POSTGRESQL_PORT + PGBOUNCER_USERLIST PGBOUNCER_SET_DATABASE_USER PGBOUNCER_SET_DATABASE_PASSWORD PGBOUNCER_CONNECT_QUERY @@ -168,6 +169,7 @@ export POSTGRESQL_PASSWORD="${POSTGRESQL_PASSWORD:-}" export POSTGRESQL_DATABASE="${POSTGRESQL_DATABASE:-postgres}" export POSTGRESQL_HOST="${POSTGRESQL_HOST:-postgresql}" export POSTGRESQL_PORT="${POSTGRESQL_PORT:-5432}" +export PGBOUNCER_USERLIST="${PGBOUNCER_USERLIST:-}" export PGBOUNCER_SET_DATABASE_USER="${PGBOUNCER_SET_DATABASE_USER:-no}" export PGBOUNCER_SET_DATABASE_PASSWORD="${PGBOUNCER_SET_DATABASE_PASSWORD:-no}" export PGBOUNCER_CONNECT_QUERY="${PGBOUNCER_CONNECT_QUERY:-}" diff --git a/bitnami/pgbouncer/README.md b/bitnami/pgbouncer/README.md index d686761a4d10..085d415666e2 100644 --- a/bitnami/pgbouncer/README.md +++ b/bitnami/pgbouncer/README.md @@ -116,6 +116,7 @@ To expose the same database name as the backend, set `PGBOUNCER_DATABASE="$POSTG * `PGBOUNCER_AUTH_USER`: PgBouncer will use this user to connect to the database and query the PostgreSQL backend for a user and password. No defaults. * `PGBOUNCER_AUTH_QUERY`: PgBouncer will use this query to connect to the database and query the PostgreSQL backend for a user and password. No defaults. +* `PGBOUNCER_USERLIST`: Specify content of the *userlist.txt* file * `PGBOUNCER_POOL_MODE` : PgBouncer pool mode. Allowed values: session, transaction and statement. Default: **session**. * `PGBOUNCER_INIT_SLEEP_TIME` : PgBouncer initialization sleep time. Default: **10**. * `PGBOUNCER_INIT_MAX_RETRIES` : PgBouncer initialization maximum retries. Default: **10**.