[bitnami/ghost] Update Ghost image with SMTP ENV fixes (#66232)
* Update libghost.sh Fixes some SMTP config issues Signed-off-by: Jax Gauthier <jax@gauthier.id> * Update ghost-env.sh Fixes SMTP configuration Signed-off-by: Jax Gauthier <jax@gauthier.id> * Update README.md Update documentation Signed-off-by: Jax Gauthier <jax@gauthier.id> * Update ghost-env.sh Co-authored-by: Juan José Martos <jotamartos@gmail.com> Signed-off-by: Jax Gauthier <jax@gauthier.id> --------- Signed-off-by: Jax Gauthier <jax@gauthier.id> Co-authored-by: Juan José Martos <jotamartos@gmail.com>
This commit is contained in:
parent
9b7b9e7fd0
commit
2f160f5bbe
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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` |
|
||||
|
|
|
|||
Loading…
Reference in New Issue