From 6482f267756246dae3028c82140b5c84c20294e5 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Fri, 23 Feb 2024 14:59:11 +0100 Subject: [PATCH] [bitnami/postgresql-repmgr] Release 12.18.0-debian-12-r5 (#63350) Signed-off-by: Bitnami Containers --- bitnami/postgresql-repmgr/12/debian-12/Dockerfile | 4 ++-- .../opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh | 6 ++++++ .../opt/bitnami/scripts/postgresql-repmgr/postunpack.sh | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bitnami/postgresql-repmgr/12/debian-12/Dockerfile b/bitnami/postgresql-repmgr/12/debian-12/Dockerfile index b9fb30df6170..172bf6e53973 100644 --- a/bitnami/postgresql-repmgr/12/debian-12/Dockerfile +++ b/bitnami/postgresql-repmgr/12/debian-12/Dockerfile @@ -7,10 +7,10 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-02-21T13:10:53Z" \ + org.opencontainers.image.created="2024-02-23T13:17:31Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="12.18.0-debian-12-r4" \ + org.opencontainers.image.ref.name="12.18.0-debian-12-r5" \ org.opencontainers.image.title="postgresql-repmgr" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="12.18.0" diff --git a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh index 4ed25e56dc77..471c85a1a4b3 100755 --- a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh +++ b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/entrypoint.sh @@ -24,6 +24,12 @@ print_welcome_page # Enable the nss_wrapper settings postgresql_enable_nss_wrapper +# We add the copy from default config in the entrypoint to not break users +# bypassing the setup.sh logic. If the file already exists do not overwrite (in +# case someone mounts a configuration file in /opt/bitnami/postgresql/conf) +debug "Copying files from $POSTGRESQL_DEFAULT_CONF_DIR to $POSTGRESQL_CONF_DIR" +cp -nr "$POSTGRESQL_DEFAULT_CONF_DIR"/. "$POSTGRESQL_CONF_DIR" + if [[ "$*" = *"/opt/bitnami/scripts/postgresql-repmgr/run.sh"* ]]; then info "** Starting PostgreSQL with Replication Manager setup **" /opt/bitnami/scripts/postgresql-repmgr/setup.sh diff --git a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/postunpack.sh b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/postunpack.sh index 11fa8a0f1edc..85144a0fb47a 100755 --- a/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/postunpack.sh +++ b/bitnami/postgresql-repmgr/12/debian-12/rootfs/opt/bitnami/scripts/postgresql-repmgr/postunpack.sh @@ -13,7 +13,7 @@ # Load PostgreSQL & repmgr environment variables . /opt/bitnami/scripts/postgresql-env.sh -for dir in "$POSTGRESQL_INITSCRIPTS_DIR" "$POSTGRESQL_TMP_DIR" "$POSTGRESQL_LOG_DIR" "$POSTGRESQL_CONF_DIR" "${POSTGRESQL_CONF_DIR}/conf.d" "$POSTGRESQL_MOUNTED_CONF_DIR" "${POSTGRESQL_MOUNTED_CONF_DIR}/conf.d" "$POSTGRESQL_VOLUME_DIR" "$REPMGR_CONF_DIR" "$REPMGR_TMP_DIR"; do +for dir in "$POSTGRESQL_INITSCRIPTS_DIR" "$POSTGRESQL_TMP_DIR" "$POSTGRESQL_LOG_DIR" "$POSTGRESQL_CONF_DIR" "${POSTGRESQL_CONF_DIR}/conf.d" "$POSTGRESQL_DEFAULT_CONF_DIR" "$POSTGRESQL_MOUNTED_CONF_DIR" "${POSTGRESQL_MOUNTED_CONF_DIR}/conf.d" "$POSTGRESQL_VOLUME_DIR" "$REPMGR_CONF_DIR" "$REPMGR_TMP_DIR"; do ensure_dir_exists "$dir" chmod -R g+rwX "$dir" done @@ -25,3 +25,8 @@ chmod +x "$REPMGR_EVENTS_DIR"/router.sh "$REPMGR_EVENTS_DIR"/execs/*sh "$REPMGR_ # Redirect all logging to stdout ln -sf /dev/stdout "$POSTGRESQL_LOG_FILE" + +# Copy all initially generated configuration files to the default directory +# (this is to avoid breaking when entrypoint is being overridden) +cp -r "${POSTGRESQL_CONF_DIR}/"* "$POSTGRESQL_DEFAULT_CONF_DIR" +