From 2f160f5bbeed16779976f2d762bd41102fa63339 Mon Sep 17 00:00:00 2001 From: Jax Gauthier Date: Thu, 9 May 2024 10:05:25 -0400 Subject: [PATCH] [bitnami/ghost] Update Ghost image with SMTP ENV fixes (#66232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update libghost.sh Fixes some SMTP config issues Signed-off-by: Jax Gauthier * Update ghost-env.sh Fixes SMTP configuration Signed-off-by: Jax Gauthier * Update README.md Update documentation Signed-off-by: Jax Gauthier * Update ghost-env.sh Co-authored-by: Juan José Martos Signed-off-by: Jax Gauthier --------- Signed-off-by: Jax Gauthier Co-authored-by: Juan José Martos --- .../ghost/5/debian-12/rootfs/opt/bitnami/scripts/ghost-env.sh | 3 +++ .../ghost/5/debian-12/rootfs/opt/bitnami/scripts/libghost.sh | 4 ++-- bitnami/ghost/README.md | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/ghost-env.sh b/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/ghost-env.sh index 4a1166935e3b..fe6730739536 100644 --- a/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/ghost-env.sh +++ b/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/ghost-env.sh @@ -35,6 +35,7 @@ ghost_env_vars=( GHOST_USERNAME GHOST_PASSWORD GHOST_EMAIL + GHOST_SMTP_FROM_ADDRESS GHOST_SMTP_HOST GHOST_SMTP_PORT_NUMBER GHOST_SMTP_USER @@ -108,6 +109,8 @@ export GHOST_EMAIL="${GHOST_EMAIL:-user@example.com}" # only used during the fir # Ghost SMTP credentials GHOST_SMTP_HOST="${GHOST_SMTP_HOST:-"${SMTP_HOST:-}"}" export GHOST_SMTP_HOST="${GHOST_SMTP_HOST:-}" # only used during the first initialization +GHOST_SMTP_FROM_ADDRESS="${GHOST_SMTP_FROM_ADDRESS:-"${SMTP_FROM:-}"}" +GHOST_SMTP_FROM_ADDRESS="${GHOST_SMTP_FROM_ADDRESS:-"${GHOST_EMAIL:-}"}" GHOST_SMTP_PORT_NUMBER="${GHOST_SMTP_PORT_NUMBER:-"${SMTP_PORT:-}"}" GHOST_SMTP_PORT_NUMBER="${GHOST_SMTP_PORT_NUMBER:-"${GHOST_SMTP_PORT:-}"}" export GHOST_SMTP_PORT_NUMBER="${GHOST_SMTP_PORT_NUMBER:-}" # only used during the first initialization diff --git a/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/libghost.sh b/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/libghost.sh index 8e04a965c0f4..7926fe9598cb 100644 --- a/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/libghost.sh +++ b/bitnami/ghost/5/debian-12/rootfs/opt/bitnami/scripts/libghost.sh @@ -309,11 +309,11 @@ ghost_initialize() { # https://ghost.org/docs/config/#mail if ! is_empty_value "$GHOST_SMTP_HOST"; then info "Configuring SMTP settings" - ghost_conf_set "mail.from" "$GHOST_EMAIL" + ghost_conf_set "mail.from" "$GHOST_SMTP_FROM_ADDRESS" ghost_conf_set "mail.transport" "SMTP" ghost_conf_set "mail.options.host" "$GHOST_SMTP_HOST" ghost_conf_set "mail.options.port" "$GHOST_SMTP_PORT_NUMBER" "int" - ghost_conf_set "mail.options.secureConnection" "$([[ "$GHOST_SMTP_PROTOCOL" = "ssl" || "$GHOST_SMTP_PROTOCOL" = "tls" ]] && echo "true" || echo "false")" "bool" + ghost_conf_set "mail.options.secure" "$([[ "$GHOST_SMTP_PROTOCOL" = "ssl" || "$GHOST_SMTP_PROTOCOL" = "tls" ]] && echo "true" || echo "false")" "bool" ghost_conf_set "mail.options.auth.user" "$GHOST_SMTP_USER" ghost_conf_set "mail.options.auth.pass" "$GHOST_SMTP_PASSWORD" fi diff --git a/bitnami/ghost/README.md b/bitnami/ghost/README.md index 4a82efa078a8..f1be8d73494a 100644 --- a/bitnami/ghost/README.md +++ b/bitnami/ghost/README.md @@ -211,6 +211,7 @@ docker run -d --name ghost \ | `GHOST_USERNAME` | Ghost user name. | `user` | | `GHOST_PASSWORD` | Ghost user password. | `bitnami123` | | `GHOST_EMAIL` | Ghost user e-mail address. | `user@example.com` | +| `GHOST_SMTP_FROM_ADDRESS` | Ghost SMTP from address. | `nil` | | `GHOST_SMTP_HOST` | Ghost SMTP server host. | `nil` | | `GHOST_SMTP_PORT_NUMBER` | Ghost SMTP server port number. | `nil` | | `GHOST_SMTP_USER` | Ghost SMTP server user. | `nil` |