8.9.5-debian-10-r6 release

This commit is contained in:
Bitnami Bot 2020-09-09 21:36:57 +00:00
parent be13aa8dbc
commit 768a07af94
5 changed files with 165 additions and 21 deletions

View File

@ -15,14 +15,14 @@ RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "mysql-client" "1
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "libphp" "7.3.22-0" --checksum ac87df7d3775f41c83866359667413c5762bc73e87fae0ceb3e8805de5b7450a
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "render-template" "1.0.0-1" --checksum a94f94357aa06f3718db1550fa5f5188cd61383d66bf754eef49c58a18bf02cc
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.12.0-1" --checksum 51cfb1b7fd7b05b8abd1df0278c698103a9b1a4964bdacd87ca1d5c01631d59c
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "drupal" "8.9.5-0" --checksum 500e2b97eb9a3cd1236033d3f8183ae067666478b8d77b6284585d1910ed7e22
RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "drupal" "8.9.5-1" --checksum da33a06695b5303f212c213fceef511116564f228ff016281cda4a636d4dfc0f
RUN apt-get update && apt-get upgrade -y && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
RUN chmod g+rwX /opt/bitnami
COPY rootfs /
RUN /opt/bitnami/scripts/apache/postunpack.sh
RUN /opt/bitnami/scripts/php/postunpack.sh
RUN /opt/bitnami/scripts/apache/postunpack.sh
RUN /opt/bitnami/scripts/apache-modphp/postunpack.sh
RUN /opt/bitnami/scripts/drupal/postunpack.sh
RUN /opt/bitnami/scripts/mysql-client/postunpack.sh
@ -31,7 +31,7 @@ ENV ALLOW_EMPTY_PASSWORD="no" \
APACHE_HTTPS_PORT_NUMBER="" \
APACHE_HTTP_PORT_NUMBER="" \
BITNAMI_APP_NAME="drupal" \
BITNAMI_IMAGE_VERSION="8.9.5-debian-10-r5" \
BITNAMI_IMAGE_VERSION="8.9.5-debian-10-r6" \
DRUPAL_DATABASE_NAME="" \
DRUPAL_DATABASE_PASSWORD="" \
DRUPAL_DATABASE_USER="" \

View File

@ -8,10 +8,10 @@
},
"drupal": {
"arch": "amd64",
"digest": "500e2b97eb9a3cd1236033d3f8183ae067666478b8d77b6284585d1910ed7e22",
"digest": "da33a06695b5303f212c213fceef511116564f228ff016281cda4a636d4dfc0f",
"distro": "debian-10",
"type": "NAMI",
"version": "8.9.5-0"
"version": "8.9.5-1"
},
"gosu": {
"arch": "amd64",

View File

@ -26,6 +26,11 @@ drupal_env_vars=(
DRUPAL_USERNAME
DRUPAL_PASSWORD
DRUPAL_EMAIL
DRUPAL_SMTP_HOST
DRUPAL_SMTP_PORT_NUMBER
DRUPAL_SMTP_USER
DRUPAL_SMTP_PASSWORD
DRUPAL_SMTP_PROTOCOL
DRUPAL_DATABASE_HOST
DRUPAL_DATABASE_PORT_NUMBER
DRUPAL_DATABASE_NAME
@ -33,6 +38,12 @@ drupal_env_vars=(
DRUPAL_DATABASE_PASSWORD
DRUPAL_DATABASE_TLS_CA_FILE
DRUPAL_DATABASE_MIN_VERSION
SMTP_HOST
SMTP_PORT
DRUPAL_SMTP_PORT
SMTP_USER
SMTP_PASSWORD
SMTP_PROTOCOL
MARIADB_HOST
MARIADB_PORT_NUMBER
)
@ -56,26 +67,39 @@ export DRUPAL_MOUNTED_CONF_FILE="${DRUPAL_VOLUME_DIR}/settings.php"
export DRUPAL_DATA_TO_PERSIST="${DRUPAL_DATA_TO_PERSIST:-sites/ themes/ modules/ profiles/}"
# Drupal configuration
export DRUPAL_PROFILE="${DRUPAL_PROFILE:-standard}"
export DRUPAL_SITE_NAME="${DRUPAL_SITE_NAME:-My blog}"
export DRUPAL_SKIP_BOOTSTRAP="${DRUPAL_SKIP_BOOTSTRAP:-}"
export DRUPAL_ENABLE_MODULES="${DRUPAL_ENABLE_MODULES:-}"
export DRUPAL_PROFILE="${DRUPAL_PROFILE:-standard}" # only used during the first initialization
export DRUPAL_SITE_NAME="${DRUPAL_SITE_NAME:-My blog}" # only used during the first initialization
export DRUPAL_SKIP_BOOTSTRAP="${DRUPAL_SKIP_BOOTSTRAP:-}" # only used during the first initialization
export DRUPAL_ENABLE_MODULES="${DRUPAL_ENABLE_MODULES:-}" # only used during the first initialization
# Drupal credentials
export DRUPAL_USERNAME="${DRUPAL_USERNAME:-user}"
export DRUPAL_PASSWORD="${DRUPAL_PASSWORD:-bitnami}"
export DRUPAL_EMAIL="${DRUPAL_EMAIL:-user@example.com}"
export DRUPAL_USERNAME="${DRUPAL_USERNAME:-user}" # only used during the first initialization
export DRUPAL_PASSWORD="${DRUPAL_PASSWORD:-bitnami}" # only used during the first initialization
export DRUPAL_EMAIL="${DRUPAL_EMAIL:-user@example.com}" # only used during the first initialization
# Drupal SMTP credentials
DRUPAL_SMTP_HOST="${DRUPAL_SMTP_HOST:-"${SMTP_HOST:-}"}"
export DRUPAL_SMTP_HOST="${DRUPAL_SMTP_HOST:-}" # only used during the first initialization
DRUPAL_SMTP_PORT_NUMBER="${DRUPAL_SMTP_PORT_NUMBER:-"${SMTP_PORT:-}"}"
DRUPAL_SMTP_PORT_NUMBER="${DRUPAL_SMTP_PORT_NUMBER:-"${DRUPAL_SMTP_PORT:-}"}"
export DRUPAL_SMTP_PORT_NUMBER="${DRUPAL_SMTP_PORT_NUMBER:-25}" # only used during the first initialization
DRUPAL_SMTP_USER="${DRUPAL_SMTP_USER:-"${SMTP_USER:-}"}"
export DRUPAL_SMTP_USER="${DRUPAL_SMTP_USER:-}" # only used during the first initialization
DRUPAL_SMTP_PASSWORD="${DRUPAL_SMTP_PASSWORD:-"${SMTP_PASSWORD:-}"}"
export DRUPAL_SMTP_PASSWORD="${DRUPAL_SMTP_PASSWORD:-}" # only used during the first initialization
DRUPAL_SMTP_PROTOCOL="${DRUPAL_SMTP_PROTOCOL:-"${SMTP_PROTOCOL:-}"}"
export DRUPAL_SMTP_PROTOCOL="${DRUPAL_SMTP_PROTOCOL:-standard}" # only used during the first initialization
# Database configuration
export DRUPAL_DEFAULT_DATABASE_HOST="mariadb" # only used at build time
DRUPAL_DATABASE_HOST="${DRUPAL_DATABASE_HOST:-"${MARIADB_HOST:-}"}"
export DRUPAL_DATABASE_HOST="${DRUPAL_DATABASE_HOST:-$DRUPAL_DEFAULT_DATABASE_HOST}"
export DRUPAL_DATABASE_HOST="${DRUPAL_DATABASE_HOST:-$DRUPAL_DEFAULT_DATABASE_HOST}" # only used during the first initialization
DRUPAL_DATABASE_PORT_NUMBER="${DRUPAL_DATABASE_PORT_NUMBER:-"${MARIADB_PORT_NUMBER:-}"}"
export DRUPAL_DATABASE_PORT_NUMBER="${DRUPAL_DATABASE_PORT_NUMBER:-3306}"
export DRUPAL_DATABASE_NAME="${DRUPAL_DATABASE_NAME:-bitnami_drupal}"
export DRUPAL_DATABASE_USER="${DRUPAL_DATABASE_USER:-bn_drupal}"
export DRUPAL_DATABASE_PASSWORD="${DRUPAL_DATABASE_PASSWORD:-}"
export DRUPAL_DATABASE_TLS_CA_FILE="${DRUPAL_DATABASE_TLS_CA_FILE:-}"
export DRUPAL_DATABASE_PORT_NUMBER="${DRUPAL_DATABASE_PORT_NUMBER:-3306}" # only used during the first initialization
export DRUPAL_DATABASE_NAME="${DRUPAL_DATABASE_NAME:-bitnami_drupal}" # only used during the first initialization
export DRUPAL_DATABASE_USER="${DRUPAL_DATABASE_USER:-bn_drupal}" # only used during the first initialization
export DRUPAL_DATABASE_PASSWORD="${DRUPAL_DATABASE_PASSWORD:-}" # only used during the first initialization
export DRUPAL_DATABASE_TLS_CA_FILE="${DRUPAL_DATABASE_TLS_CA_FILE:-}" # only used during the first initialization
export DRUPAL_DATABASE_MIN_VERSION="${DRUPAL_DATABASE_MIN_VERSION:-}"
# PHP configuration

View File

@ -41,6 +41,13 @@ drupal_validate() {
error "$1"
error_code=1
}
check_multi_value() {
if [[ " ${2} " != *" ${!1} "* ]]; then
print_validation_error "The allowed values for ${1} are: ${2}"
fi
}
check_yes_no_value() {
if ! is_yes_no_value "${!1}" && ! is_true_false_value "${!1}"; then
print_validation_error "The allowed values for ${1} are: yes no"
@ -77,6 +84,15 @@ drupal_validate() {
done
fi
# Validate SMTP credentials
if ! is_empty_value "$DRUPAL_SMTP_HOST"; then
for empty_env_var in "DRUPAL_SMTP_USER" "DRUPAL_SMTP_PASSWORD" "DRUPAL_SMTP_PORT_NUMBER" "DRUPAL_SMTP_PROTOCOL"; do
is_empty_value "${!empty_env_var}" && warn "The ${empty_env_var} environment variable is empty or not set."
done
! is_empty_value "$DRUPAL_DATABASE_PORT_NUMBER" && validate_port "$DRUPAL_SMTP_PORT_NUMBER"
! is_empty_value "$DRUPAL_SMTP_PROTOCOL" && check_multi_value "DRUPAL_SMTP_PROTOCOL" "standard tls ssl"
fi
# Check that the web server is properly set up
web_server_validate || print_validation_error "Web server validation failed"
@ -126,6 +142,10 @@ drupal_initialize() {
info "Enabling Drupal modules"
drupal_enable_modules
fi
if ! is_empty_value "$DRUPAL_SMTP_HOST"; then
info "Configuring SMTP"
drupal_configure_smtp
fi
info "Flushing Drupal cache"
drupal_flush_cache
else
@ -259,7 +279,7 @@ drupal_site_install() {
# Globals:
# *
# Arguments:
# None
# $@ - Arguments to pass to the Drush tool
# Returns:
# None
#########################
@ -271,6 +291,30 @@ drush_execute() {
fi
}
########################
# Execute Drush Tool to set a config option
# Globals:
# *
# Arguments:
# $1 - config group
# $2 - config key
# $3 - config value
# Returns:
# None
#########################
drush_config_set() {
local -r group="${1:?missing config group}"
local -r key="${2:?missing config key}"
local -r value="${3:?missing config value}"
local -r major_version="$(get_sematic_version "$(drupal_get_version)" 1)"
if [[ "$major_version" -gt 7 ]]; then
drush_execute "config-set" "--yes" "$group" "$key" "$value"
else
drush_execute "variable-set" "$key" "$value"
fi
}
########################
# Get Drupal version
# Globals:
@ -300,6 +344,36 @@ drupal_enable_modules() {
drush_execute "pm:enable" "--yes" "${modules[@]}"
}
########################
# Drupal configure SMTP
# Globals:
# *
# Arguments:
# None
# Returns:
# None
#########################
drupal_configure_smtp() {
local -r major_version="$(get_sematic_version "$(drupal_get_version)" 1)"
drush_execute "pm:enable" "--yes" "smtp"
if [[ "$major_version" -gt 7 ]]; then
drush_config_set "system.mail" "interface.default" "SMTPMailSystem"
else
drush_execute "php:eval" 'variable_set("mail_system", array("default-system" => "SmtpMailSystem"))'
fi
drush_config_set "smtp.settings" "smtp_on" "1"
drush_config_set "smtp.settings" "smtp_host" "$DRUPAL_SMTP_HOST"
drush_config_set "smtp.settings" "smtp_port" "$DRUPAL_SMTP_PORT_NUMBER"
drush_config_set "smtp.settings" "smtp_protocol" "$DRUPAL_SMTP_PROTOCOL"
drush_config_set "smtp.settings" "smtp_username" "$DRUPAL_SMTP_USER"
drush_config_set "smtp.settings" "smtp_password" "$DRUPAL_SMTP_PASSWORD"
drush_config_set "smtp.settings" "smtp_from" "$DRUPAL_EMAIL"
drush_config_set "smtp.settings" "smtp_fromname" "$DRUPAL_SITE_NAME"
}
########################
# Drupal flush cache
# Globals:
@ -315,7 +389,7 @@ drupal_flush_cache() {
drush_execute "cache:rebuild"
else
# This is occasionally needed by modules that make system-wide changes to access levels.
drush_execute php-eval 'node_access_rebuild();'
drush_execute "php:eval" 'node_access_rebuild();'
drush_execute "cache:clear" "all"
fi
}

View File

@ -40,7 +40,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
* [`9`, `9-debian-10`, `9.0.5`, `9.0.5-debian-10-r2`, `latest` (9/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/9.0.5-debian-10-r2/9/debian-10/Dockerfile)
* [`8`, `8-debian-10`, `8.9.5`, `8.9.5-debian-10-r5` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/8.9.5-debian-10-r5/8/debian-10/Dockerfile)
* [`8`, `8-debian-10`, `8.9.5`, `8.9.5-debian-10-r6` (8/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-drupal/blob/8.9.5-debian-10-r6/8/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/drupal GitHub repo](https://github.com/bitnami/bitnami-docker-drupal).
@ -250,10 +250,56 @@ Available environment variables:
- `MYSQL_CLIENT_CREATE_DATABASE_PASSWORD`: Database password for the `MYSQL_CLIENT_CREATE_DATABASE_USER` user. No defaults.
- `ALLOW_EMPTY_PASSWORD`: It can be used to allow blank passwords. Default: **no**
##### SMTP Configuration
To configure Drupal to send email using SMTP you can set the following environment variables:
- `DRUPAL_SMTP_HOST`: SMTP host.
- `DRUPAL_SMTP_PORT`: SMTP port.
- `DRUPAL_SMTP_USER`: SMTP account user.
- `DRUPAL_SMTP_PASSWORD`: SMTP account password.
- `DRUPAL_SMTP_PROTOCOL`: SMTP protocol. (standard, tls, ssl).
##### PHP configuration
- `PHP_MEMORY_LIMIT`: Memory limit for PHP. Default: **256M**
##### Example
This would be an example of SMTP configuration using a Gmail account:
* Modify the [`docker-compose.yml`](https://github.com/bitnami/bitnami-docker-drupal/blob/master/docker-compose.yml) file present in this repository:
```yaml
drupal:
...
environment:
- DRUPAL_DATABASE_USER=bn_drupal
- DRUPAL_DATABASE_NAME=bitnami_drupal
- ALLOW_EMPTY_PASSWORD=yes
- DRUPAL_SMTP_HOST=smtp.gmail.com
- DRUPAL_SMTP_PORT=587
- DRUPAL_SMTP_USER=your_email@gmail.com
- DRUPAL_SMTP_PASSWORD=your_password
- DRUPAL_SMTP_PROTOCOL=tls
...
```
* For manual execution:
```console
$ docker run -d --name drupal -p 80:8080 -p 443:8443 \
--env DRUPAL_DATABASE_USER=bn_drupal \
--env DRUPAL_DATABASE_NAME=bitnami_drupal \
--env DRUPAL_SMTP_HOST=smtp.gmail.com \
--env DRUPAL_SMTP_PORT=587 \
--env DRUPAL_SMTP_USER=your_email@gmail.com \
--env DRUPAL_SMTP_PASSWORD=your_password \
--env DRUPAL_SMTP_PROTOCOL=tls \
--network drupal-tier \
--volume /path/to/drupal-persistence:/bitnami \
bitnami/drupal:latest
```
## Logging
The Bitnami Drupal Docker image sends the container logs to `stdout`. To view the logs: