From 6784bc180206d9feb5b0a42ddcdc0c27ad185c37 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Sun, 21 May 2023 19:35:04 +0100 Subject: [PATCH] [bitnami/supabase-postgres] Release 15.1.0-debian-11-r42 (#34796) Signed-off-by: Bitnami Containers --- .../supabase-postgres/15/debian-11/Dockerfile | 8 ++++---- .../opt/bitnami/.bitnami_components.json | 4 ++-- .../opt/bitnami/scripts/libpostgresql.sh | 18 +++++++++++++++++- .../opt/bitnami/scripts/postgresql-env.sh | 4 ++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/bitnami/supabase-postgres/15/debian-11/Dockerfile b/bitnami/supabase-postgres/15/debian-11/Dockerfile index b15777f3278f..5640251aabf9 100644 --- a/bitnami/supabase-postgres/15/debian-11/Dockerfile +++ b/bitnami/supabase-postgres/15/debian-11/Dockerfile @@ -5,10 +5,10 @@ ARG TARGETARCH ARG WITH_ALL_LOCALES="no" LABEL org.opencontainers.image.base.name="docker.io/bitnami/minideb:bullseye" \ - org.opencontainers.image.created="2023-05-17T10:34:23Z" \ + org.opencontainers.image.created="2023-05-21T17:14:47Z" \ org.opencontainers.image.description="Application packaged by VMware, Inc" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="15.1.0-debian-11-r41" \ + org.opencontainers.image.ref.name="15.1.0-debian-11-r42" \ org.opencontainers.image.title="supabase-postgres" \ org.opencontainers.image.vendor="VMware, Inc." \ org.opencontainers.image.version="15.1.0" @@ -24,8 +24,8 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl libbrotli1 libbsd0 libbz2-1.0 libcom-err2 libcrypt1 libcurl4 libedit2 libevent-2.1-7 libffi7 libgcc-s1 libgcrypt20 libgmp10 libgnutls30 libgpg-error0 libgssapi-krb5-2 libhogweed6 libicu67 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblz4-1 liblzma5 libmd0 libmecab2 libmsgpackc2 libncurses6 libnettle8 libnghttp2-14 libnorm1 libp11-kit0 libpcre3 libpgm-5.3-0 libpsl5 libreadline8 librtmp1 libsasl2-2 libsodium23 libsqlite3-0 libssh2-1 libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 libzmq5 libzstd1 locales procps zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \ COMPONENTS=( \ - "java-17.0.7-7-1-linux-${OS_ARCH}-debian-11" \ - "supabase-postgres-15.1.0-30-linux-${OS_ARCH}-debian-11" \ + "java-17.0.7-7-2-linux-${OS_ARCH}-debian-11" \ + "supabase-postgres-15.1.0-31-linux-${OS_ARCH}-debian-11" \ ) && \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/supabase-postgres/15/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/supabase-postgres/15/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json index 292522c5ffd6..15b6839e18b1 100644 --- a/bitnami/supabase-postgres/15/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/supabase-postgres/15/debian-11/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,12 +3,12 @@ "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "17.0.7-7-1" + "version": "17.0.7-7-2" }, "supabase-postgres": { "arch": "amd64", "distro": "debian-11", "type": "NAMI", - "version": "15.1.0-30" + "version": "15.1.0-31" } } \ No newline at end of file diff --git a/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/libpostgresql.sh index 678ce259b5a1..9299aa0ef01e 100644 --- a/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/libpostgresql.sh @@ -54,6 +54,12 @@ postgresql_validate() { error_code=1 } + check_multi_value() { + if [[ " ${2} " != *" ${!1} "* ]]; then + print_validation_error "The allowed values for ${1} are: ${2}" + fi + } + empty_password_enabled_warn() { warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment." } @@ -143,6 +149,10 @@ postgresql_validate() { fi fi + if [[ -n "$POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE" ]]; then + check_multi_value "POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE" "FIRST ANY" + fi + [[ "$error_code" -eq 0 ]] || exit "$error_code" } @@ -390,6 +400,7 @@ postgresql_configure_replication_parameters() { ######################### postgresql_configure_synchronous_replication() { local replication_nodes="" + local synchronous_standby_names="" info "Configuring synchronous_replication" # Check for comma separate values @@ -409,8 +420,13 @@ postgresql_configure_synchronous_replication() { fi if ((POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS > 0)); then + synchronous_standby_names="${POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS} (${replication_nodes})" + if [[ -n "$POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE" ]]; then + synchronous_standby_names="${POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE} ${synchronous_standby_names}" + fi + postgresql_set_property "synchronous_commit" "$POSTGRESQL_SYNCHRONOUS_COMMIT_MODE" - postgresql_set_property "synchronous_standby_names" "${POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS} (${replication_nodes})" + postgresql_set_property "synchronous_standby_names" "$synchronous_standby_names" fi } diff --git a/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/postgresql-env.sh b/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/postgresql-env.sh index c99a136bf1f4..9fa2c899d60a 100644 --- a/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/postgresql-env.sh +++ b/bitnami/supabase-postgres/15/debian-11/rootfs/opt/bitnami/scripts/postgresql-env.sh @@ -36,6 +36,7 @@ postgresql_env_vars=( POSTGRESQL_MASTER_HOST POSTGRESQL_MASTER_PORT_NUMBER POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS + POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE POSTGRESQL_PORT_NUMBER POSTGRESQL_ALLOW_REMOTE_CONNECTIONS POSTGRESQL_REPLICATION_MODE @@ -103,6 +104,7 @@ postgresql_env_vars=( POSTGRES_MASTER_HOST POSTGRES_MASTER_PORT_NUMBER POSTGRES_NUM_SYNCHRONOUS_REPLICAS + POSTGRES_SYNCHRONOUS_REPLICAS_MODE POSTGRES_PORT_NUMBER POSTGRES_ALLOW_REMOTE_CONNECTIONS POSTGRES_REPLICATION_MODE @@ -215,6 +217,8 @@ POSTGRESQL_MASTER_PORT_NUMBER="${POSTGRESQL_MASTER_PORT_NUMBER:-"${POSTGRES_MAST export POSTGRESQL_MASTER_PORT_NUMBER="${POSTGRESQL_MASTER_PORT_NUMBER:-5432}" POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS="${POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS:-"${POSTGRES_NUM_SYNCHRONOUS_REPLICAS:-}"}" export POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS="${POSTGRESQL_NUM_SYNCHRONOUS_REPLICAS:-0}" +POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE="${POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE:-"${POSTGRES_SYNCHRONOUS_REPLICAS_MODE:-}"}" +export POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE="${POSTGRESQL_SYNCHRONOUS_REPLICAS_MODE:-}" POSTGRESQL_PORT_NUMBER="${POSTGRESQL_PORT_NUMBER:-"${POSTGRES_PORT_NUMBER:-}"}" export POSTGRESQL_PORT_NUMBER="${POSTGRESQL_PORT_NUMBER:-5432}" POSTGRESQL_ALLOW_REMOTE_CONNECTIONS="${POSTGRESQL_ALLOW_REMOTE_CONNECTIONS:-"${POSTGRES_ALLOW_REMOTE_CONNECTIONS:-}"}"