config: move default config var to Dockerfile
This commit is contained in:
parent
ea1460b6c9
commit
b0bab92ef9
|
|
@ -21,6 +21,15 @@ RUN bitnami-pkg unpack drupal-8.2.6-0 --checksum a8f874db6aef1e4dae22b2fd88e700b
|
|||
|
||||
COPY rootfs /
|
||||
|
||||
ENV APACHE_HTTP_PORT="80" \
|
||||
APACHE_HTTPS_PORT="443" \
|
||||
DRUPAL_USERNAME="user" \
|
||||
DRUPAL_PASSWORD="bitnami" \
|
||||
DRUPAL_EMAIL="user@example.com" \
|
||||
MARIADB_USER="root" \
|
||||
MARIADB_HOST="mariadb" \
|
||||
MARIADB_PORT="3306"
|
||||
|
||||
VOLUME ["/bitnami/drupal", "/bitnami/apache", "/bitnami/php"]
|
||||
|
||||
EXPOSE 80 443
|
||||
|
|
|
|||
|
|
@ -13,16 +13,6 @@ function initialize {
|
|||
fi
|
||||
}
|
||||
|
||||
# Set default values
|
||||
export APACHE_HTTP_PORT=${APACHE_HTTP_PORT:-"80"}
|
||||
export APACHE_HTTPS_PORT=${APACHE_HTTPS_PORT:-"443"}
|
||||
export DRUPAL_USERNAME=${DRUPAL_USERNAME:-"user"}
|
||||
export DRUPAL_PASSWORD=${DRUPAL_PASSWORD:-"bitnami"}
|
||||
export DRUPAL_EMAIL=${DRUPAL_EMAIL:-"user@example.com"}
|
||||
export MARIADB_USER=${MARIADB_USER:-"root"}
|
||||
export MARIADB_HOST=${MARIADB_HOST:-"mariadb"}
|
||||
export MARIADB_PORT=${MARIADB_PORT:-"3306"}
|
||||
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
for module in apache php drupal; do
|
||||
initialize $module
|
||||
|
|
|
|||
Loading…
Reference in New Issue