mirror of
https://github.com/bitnami/containers.git
synced 2026-10-17 12:30:04 +02:00
[bitnami/postgresql-repmgr] Release 18.4.0-debian-12-r10 (#94628)
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
@@ -3,11 +3,11 @@
|
||||
|
||||
FROM docker.io/bitnami/minideb:bookworm
|
||||
|
||||
ARG DOWNLOADS_URL="downloads.bitnami.com/files/stacksmith"
|
||||
ARG DOWNLOADS_URL="https://downloads.bitnami.com/files/stacksmith"
|
||||
ARG TARGETARCH
|
||||
|
||||
LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \
|
||||
org.opencontainers.image.created="2026-06-09T00:18:39Z" \
|
||||
org.opencontainers.image.created="2026-06-10T22:41:48Z" \
|
||||
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
|
||||
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr/README.md" \
|
||||
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr" \
|
||||
@@ -33,7 +33,7 @@ RUN --mount=type=secret,id=downloads_url,env=SECRET_DOWNLOADS_URL \
|
||||
) ; \
|
||||
for COMPONENT in "${COMPONENTS[@]}"; do \
|
||||
if [ ! -f "${COMPONENT}.tar.gz" ]; then \
|
||||
curl -SsLf "https://${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
|
||||
curl -SsLf "${DOWNLOADS_URL}/${COMPONENT}.tar.gz" -O ; \
|
||||
fi ; \
|
||||
sha256sum -c "/opt/bitnami/checksums/${COMPONENT}.tar.gz.sha256" ; \
|
||||
tar -zxf "${COMPONENT}.tar.gz" -C /opt/bitnami --strip-components=2 --no-same-owner ; \
|
||||
@@ -55,7 +55,7 @@ COPY rootfs /
|
||||
RUN /opt/bitnami/scripts/postgresql-repmgr/postunpack.sh
|
||||
ENV APP_VERSION="18.4.0" \
|
||||
BITNAMI_APP_NAME="postgresql-repmgr" \
|
||||
IMAGE_REVISION="9" \
|
||||
IMAGE_REVISION="10" \
|
||||
LANG="en_US.UTF-8" \
|
||||
LANGUAGE="en_US:en" \
|
||||
NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \
|
||||
|
||||
@@ -162,6 +162,10 @@ repmgr_validate() {
|
||||
print_validation_error "The allowed values for REPMGR_FAILOVER are: automatic or manual."
|
||||
fi
|
||||
|
||||
if [[ -z "$REPMGR_SSL_CA_FILE" ]] && [[ "$REPMGR_SSL_MODE" =~ ^(verify-ca|verify-full)$ ]]; then
|
||||
print_validation_error "The environment variable REPMGR_SSL_CA_FILE is required when REPMGR_SSL_MODE is set to 'verify-ca' or 'verify-full'."
|
||||
fi
|
||||
|
||||
[[ "$error_code" -eq 0 ]] || exit "$error_code"
|
||||
}
|
||||
|
||||
@@ -663,8 +667,11 @@ repmgr_clone_primary() {
|
||||
fi
|
||||
|
||||
info "Cloning data from primary node..."
|
||||
local -r flags=("-f" "$REPMGR_CONF_FILE" "-h" "$REPMGR_CURRENT_PRIMARY_HOST" "-p" "$REPMGR_CURRENT_PRIMARY_PORT" "-U" "$REPMGR_USERNAME" "-d" "dbname=$REPMGR_DATABASE host=$REPMGR_CURRENT_PRIMARY_HOST port=$REPMGR_CURRENT_PRIMARY_PORT connect_timeout=$REPMGR_CONNECT_TIMEOUT" "-D" "$POSTGRESQL_DATA_DIR" "standby" "clone" "--fast-checkpoint" "--force")
|
||||
|
||||
local ssl_connstr="sslmode=${REPMGR_SSL_MODE}"
|
||||
if [[ -f "${REPMGR_SSL_CA_FILE:-}" ]]; then
|
||||
ssl_connstr+=" sslrootcert=${REPMGR_SSL_CA_FILE}"
|
||||
fi
|
||||
local -r flags=("-f" "$REPMGR_CONF_FILE" "-h" "$REPMGR_CURRENT_PRIMARY_HOST" "-p" "$REPMGR_CURRENT_PRIMARY_PORT" "-U" "$REPMGR_USERNAME" "-d" "dbname=$REPMGR_DATABASE host=$REPMGR_CURRENT_PRIMARY_HOST port=$REPMGR_CURRENT_PRIMARY_PORT connect_timeout=$REPMGR_CONNECT_TIMEOUT ${ssl_connstr}" "-D" "$POSTGRESQL_DATA_DIR" "standby" "clone" "--fast-checkpoint" "--force")
|
||||
if [[ "$REPMGR_USE_PASSFILE" = "true" ]]; then
|
||||
PGPASSFILE="$REPMGR_PASSFILE_PATH" repmgr_execute "${flags[@]}"
|
||||
else
|
||||
@@ -683,7 +690,11 @@ repmgr_clone_primary() {
|
||||
#########################
|
||||
repmgr_pgrewind() {
|
||||
info "Running pg_rewind data to primary node..."
|
||||
local -r flags=("-D" "$POSTGRESQL_DATA_DIR" "--source-server" "host=${REPMGR_CURRENT_PRIMARY_HOST} port=${REPMGR_CURRENT_PRIMARY_PORT} user=${REPMGR_USERNAME} dbname=${REPMGR_DATABASE}")
|
||||
local ssl_connstr="sslmode=${REPMGR_SSL_MODE}"
|
||||
if [[ -f "${REPMGR_SSL_CA_FILE:-}" ]]; then
|
||||
ssl_connstr+=" sslrootcert=${REPMGR_SSL_CA_FILE}"
|
||||
fi
|
||||
local -r flags=("-D" "$POSTGRESQL_DATA_DIR" "--source-server" "host=${REPMGR_CURRENT_PRIMARY_HOST} port=${REPMGR_CURRENT_PRIMARY_PORT} user=${REPMGR_USERNAME} dbname=${REPMGR_DATABASE} ${ssl_connstr}")
|
||||
|
||||
if [[ "$REPMGR_USE_PASSFILE" = "true" ]]; then
|
||||
PGPASSFILE="$REPMGR_PASSFILE_PATH" debug_execute "${POSTGRESQL_BIN_DIR}/pg_rewind" "${flags[@]}"
|
||||
|
||||
@@ -143,6 +143,8 @@ postgresql_env_vars=(
|
||||
REPMGR_PASSWORD
|
||||
REPMGR_USE_PASSFILE
|
||||
REPMGR_PASSFILE_PATH
|
||||
REPMGR_SSL_MODE
|
||||
REPMGR_SSL_CA_FILE
|
||||
PGCONNECT_TIMEOUT
|
||||
POSTGRES_DATA_DIR
|
||||
PGDATA
|
||||
@@ -474,6 +476,8 @@ export REPMGR_PGHBA_TRUST_ALL="${REPMGR_PGHBA_TRUST_ALL:-no}"
|
||||
export REPMGR_PASSWORD="${REPMGR_PASSWORD:-}"
|
||||
export REPMGR_USE_PASSFILE="${REPMGR_USE_PASSFILE:-yes}"
|
||||
export REPMGR_PASSFILE_PATH="${REPMGR_PASSFILE_PATH:-$REPMGR_CONF_DIR/.pgpass}"
|
||||
export REPMGR_SSL_MODE="${REPMGR_SSL_MODE:-prefer}"
|
||||
export REPMGR_SSL_CA_FILE="${REPMGR_SSL_CA_FILE:-}"
|
||||
|
||||
# PostgreSQL env var (Replication Manager)
|
||||
export PGCONNECT_TIMEOUT="${PGCONNECT_TIMEOUT:-10}"
|
||||
|
||||
@@ -200,6 +200,8 @@ The following tables list the main variables you can set.
|
||||
| `REPMGR_PASSWORD` | Replication manager password | `nil` |
|
||||
| `REPMGR_USE_PASSFILE` | Use PGPASSFILE instead of PGPASSWORD | `yes` |
|
||||
| `REPMGR_PASSFILE_PATH` | Path to store passfile | `$REPMGR_CONF_DIR/.pgpass` |
|
||||
| `REPMGR_SSL_MODE` | SSL mode for repmgr clone / pg_rewind connections | `prefer` |
|
||||
| `REPMGR_SSL_CA_FILE` | Path to CA certificate to use to validate SSL connections | `nil` |
|
||||
| `PGCONNECT_TIMEOUT` | PostgreSQL connection timeout | `10` |
|
||||
|
||||
#### Read-only environment variables
|
||||
|
||||
Reference in New Issue
Block a user