From 47c5a15f69f3f3bf84a45ba3ea801697debff60e Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 15 Feb 2022 00:33:30 +0000 Subject: [PATCH] 3.42.9-debian-10-r19 release --- bitnami/ghost/3/debian-10/Dockerfile | 4 +- .../opt/bitnami/.bitnami_components.json | 4 +- .../rootfs/opt/bitnami/scripts/ghost-env.sh | 4 ++ .../rootfs/opt/bitnami/scripts/libghost.sh | 55 +++++++++++++------ bitnami/ghost/README.md | 2 +- 5 files changed, 46 insertions(+), 23 deletions(-) diff --git a/bitnami/ghost/3/debian-10/Dockerfile b/bitnami/ghost/3/debian-10/Dockerfile index 512125ddde4f..05f4efd42833 100644 --- a/bitnami/ghost/3/debian-10/Dockerfile +++ b/bitnami/ghost/3/debian-10/Dockerfile @@ -11,7 +11,7 @@ COPY prebuildfs / RUN install_packages acl ca-certificates curl gzip jq libaudit1 libbsd0 libbz2-1.0 libc6 libcap-ng0 libffi6 libgcc1 libicu63 libjemalloc2 liblzma5 libncurses6 libncursesw6 libpam0g libreadline7 libsqlite3-0 libssl1.1 libstdc++6 libtinfo6 libx11-6 libxau6 libxcb1 libxdmcp6 libxml2 procps tar zlib1g RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "python" "3.8.12-31" --checksum 48db897c12810ff5f17a323e9b4a0cc2812e673d66f94feb9d90e3abb28e664b RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "node" "14.19.0-1" --checksum 400fb188f20ebb22fe9a99f6ef46598902884b9fbd87da481455cbc60273497d -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mysql-client" "10.3.32-31" --checksum 4489feca3a65fbd733774d193b02914187451c6edf27855ebc5756e45a9f299e +RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mysql-client" "10.3.34-0" --checksum fc61221a2e1a66f5dc47ab07cae39f0c20fc0d2cf7d716f72bf0c5b9d740a932 RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.14.0-4" --checksum ec62006ece7e0b49c65926e458ba2b71d6d251552118b1378840b1803dbb3d53 RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "ghost" "3.42.9-1" --checksum d0cb2722d7bbffa08a35151514a06f82730f886698e5ecf1bd6b36158c8e8f15 RUN apt-get update && apt-get upgrade -y && \ @@ -22,7 +22,7 @@ COPY rootfs / RUN /opt/bitnami/scripts/ghost/postunpack.sh RUN /opt/bitnami/scripts/mysql-client/postunpack.sh ENV BITNAMI_APP_NAME="ghost" \ - BITNAMI_IMAGE_VERSION="3.42.9-debian-10-r18" \ + BITNAMI_IMAGE_VERSION="3.42.9-debian-10-r19" \ PATH="/opt/bitnami/python/bin:/opt/bitnami/node/bin:/opt/bitnami/mysql/bin:/opt/bitnami/common/bin:/opt/bitnami/ghost/bin:$PATH" EXPOSE 2368 3000 diff --git a/bitnami/ghost/3/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/ghost/3/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json index 2167c5863733..ef7e0496fe3d 100644 --- a/bitnami/ghost/3/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/ghost/3/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json @@ -15,10 +15,10 @@ }, "mysql-client": { "arch": "amd64", - "digest": "4489feca3a65fbd733774d193b02914187451c6edf27855ebc5756e45a9f299e", + "digest": "fc61221a2e1a66f5dc47ab07cae39f0c20fc0d2cf7d716f72bf0c5b9d740a932", "distro": "debian-10", "type": "NAMI", - "version": "10.3.32-31" + "version": "10.3.34-0" }, "node": { "arch": "amd64", diff --git a/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/ghost-env.sh b/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/ghost-env.sh index d6b22149c6ad..6844a06a8972 100644 --- a/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/ghost-env.sh +++ b/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/ghost-env.sh @@ -42,6 +42,8 @@ ghost_env_vars=( GHOST_DATABASE_NAME GHOST_DATABASE_USER GHOST_DATABASE_PASSWORD + GHOST_DATABASE_ENABLE_SSL + GHOST_DATABASE_SSL_CA_FILE BLOG_TITLE SMTP_HOST SMTP_PORT @@ -125,5 +127,7 @@ GHOST_DATABASE_USER="${GHOST_DATABASE_USER:-"${MARIADB_DATABASE_USER:-}"}" export GHOST_DATABASE_USER="${GHOST_DATABASE_USER:-bn_ghost}" # only used during the first initialization GHOST_DATABASE_PASSWORD="${GHOST_DATABASE_PASSWORD:-"${MARIADB_DATABASE_PASSWORD:-}"}" export GHOST_DATABASE_PASSWORD="${GHOST_DATABASE_PASSWORD:-}" # only used during the first initialization +export GHOST_DATABASE_ENABLE_SSL="${GHOST_DATABASE_ENABLE_SSL:-no}" # only used during the first initialization +export GHOST_DATABASE_SSL_CA_FILE="${GHOST_DATABASE_SSL_CA_FILE:-}" # only used during the first initialization # Custom environment variables may be defined below diff --git a/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/libghost.sh b/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/libghost.sh index e18cf2ecb777..06d81e37520d 100644 --- a/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/libghost.sh +++ b/bitnami/ghost/3/debian-10/rootfs/opt/bitnami/scripts/libghost.sh @@ -147,6 +147,9 @@ ghost_validate() { ! is_empty_value "$GHOST_DATABASE_HOST" && check_resolved_hostname "$GHOST_DATABASE_HOST" ! is_empty_value "$GHOST_DATABASE_PORT_NUMBER" && check_valid_port "GHOST_DATABASE_PORT_NUMBER" + # Validate SSL configuration + ! is_empty_value "$GHOST_DATABASE_ENABLE_SSL" && check_yes_no_value "GHOST_DATABASE_ENABLE_SSL" + # Validate credentials check_empty_value "GHOST_PASSWORD" # ref: https://github.com/TryGhost/Ghost/issues/9150 @@ -179,7 +182,7 @@ ghost_validate() { # Arguments: # $1 - Variable name # $2 - Value to assign to the variable -# $3 - YAML type (string, int or bool) +# $3 - YAML type (string, int, bool or json) # Returns: # None ######################### @@ -191,13 +194,16 @@ ghost_conf_set() { case "$type" in string) - jq "(.${key}) |= \"${value}\"" "$GHOST_CONF_FILE" >"$tempfile" + jq "(.${key}) |= \"${value}\"" "$GHOST_CONF_FILE" > "$tempfile" ;; int) - jq "(.${key}) |= (${value} | tonumber)" "$GHOST_CONF_FILE" >"$tempfile" + jq "(.${key}) |= (${value} | tonumber)" "$GHOST_CONF_FILE" > "$tempfile" ;; bool) - jq "(.${key}) |= (\"${value}\" | test(\"true\"))" "$GHOST_CONF_FILE" >"$tempfile" + jq "(.${key}) |= (\"${value}\" | test(\"true\"))" "$GHOST_CONF_FILE" > "$tempfile" + ;; + json) + jq "(.${key}) |= ${value}" "$GHOST_CONF_FILE" > "$tempfile" ;; *) error "Type unknown: ${type}" @@ -246,20 +252,33 @@ ghost_initialize() { ghost_wait_for_mysql_connection "$GHOST_DATABASE_HOST" "$GHOST_DATABASE_PORT_NUMBER" "$GHOST_DATABASE_NAME" "$GHOST_DATABASE_USER" "$GHOST_DATABASE_PASSWORD" # Configure database info "Configuring database" - jq '.' >"$GHOST_CONF_FILE" < "$GHOST_CONF_FILE" + + if ! is_empty_value "$GHOST_DATABASE_SSL_CA_FILE"; then + ca_json="{\"ca\": \"$(cat "${GHOST_DATABASE_SSL_CA_FILE}")\"}" + ghost_conf_set "database.connection.ssl" "$ca_json" "json" + elif is_boolean_yes "$GHOST_DATABASE_ENABLE_SSL"; then + ghost_conf_set "database.connection.ssl" true "bool" + fi + am_i_root && chown "${GHOST_DAEMON_USER}:root" "$GHOST_CONF_FILE" if ! is_boolean_yes "$GHOST_SKIP_BOOTSTRAP"; then # Setup Ghost diff --git a/bitnami/ghost/README.md b/bitnami/ghost/README.md index 68877f07025c..3438a5569726 100644 --- a/bitnami/ghost/README.md +++ b/bitnami/ghost/README.md @@ -44,7 +44,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t - [`4`, `4-debian-10`, `4.36.0`, `4.36.0-debian-10-r2`, `latest` (4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/4.36.0-debian-10-r2/4/debian-10/Dockerfile) -- [`3`, `3-debian-10`, `3.42.9`, `3.42.9-debian-10-r18` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/3.42.9-debian-10-r18/3/debian-10/Dockerfile) +- [`3`, `3-debian-10`, `3.42.9`, `3.42.9-debian-10-r19` (3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-ghost/blob/3.42.9-debian-10-r19/3/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/ghost GitHub repo](https://github.com/bitnami/bitnami-docker-ghost).