mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 19:08:49 +02:00
feat: PGBOUNCER_SET_CONNECT_QUERY
Signed-off-by: Andrii Nasinnyk <anasinnyk@macpaw.com>
This commit is contained in:
committed by
Bitnami Containers
parent
bf877118cc
commit
b371eee03b
@@ -213,6 +213,9 @@ pgbouncer_initialize() {
|
||||
if ! is_empty_value "$PGBOUNCER_AUTH_USER"; then
|
||||
database_value+=" auth_user=$PGBOUNCER_AUTH_USER"
|
||||
fi
|
||||
if ! is_empty_value "$PGBOUNCER_CONNECT_QUERY"; then
|
||||
database_value+=" connect_query='$PGBOUNCER_CONNECT_QUERY'"
|
||||
fi
|
||||
ini-file set --section "databases" --key "$PGBOUNCER_DATABASE" --value "$database_value" "$PGBOUNCER_CONF_FILE"
|
||||
local -r -a key_value_pairs=(
|
||||
"listen_port:${PGBOUNCER_PORT}"
|
||||
|
||||
@@ -61,6 +61,7 @@ pgbouncer_env_vars=(
|
||||
POSTGRESQL_PORT
|
||||
PGBOUNCER_SET_DATABASE_USER
|
||||
PGBOUNCER_SET_DATABASE_PASSWORD
|
||||
PGBOUNCER_CONNECT_QUERY
|
||||
PGBOUNCER_FORCE_INITSCRIPTS
|
||||
PGBOUNCER_DAEMON_USER
|
||||
PGBOUNCER_DAEMON_GROUP
|
||||
@@ -137,6 +138,7 @@ export POSTGRESQL_HOST="${POSTGRESQL_HOST:-postgresql}"
|
||||
export POSTGRESQL_PORT="${POSTGRESQL_PORT:-5432}"
|
||||
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:-}"
|
||||
export PGBOUNCER_FORCE_INITSCRIPTS="${PGBOUNCER_FORCE_INITSCRIPTS:-false}"
|
||||
|
||||
# System settings
|
||||
|
||||
@@ -85,6 +85,8 @@ The Bitnami PgBouncer container requires a running PostgreSQL installation to co
|
||||
- `POSTGRESQL_HOST`: Backend PostgreSQL hostname. Default: **postgresql**.
|
||||
- `POSTGRESQL_PORT`: Backend PostgreSQL port. Default: **5432**.
|
||||
- `PGBOUNCER_SET_DATABASE_USER`: Whether to include the backend PostgreSQL username in the database string. Default **no**.
|
||||
- `PGBOUNCER_SET_DATABASE_PASSWORD`: Whether to include the backend PostgreSQL password in the database string. Default **no**
|
||||
- `PGBOUNCER_CONNECT_QUERY`: Query which will be executed after a connection is established. No Defaults.
|
||||
|
||||
### Port and address binding
|
||||
|
||||
|
||||
Reference in New Issue
Block a user