8.6.4-ol-7-r0 release

This commit is contained in:
Bitnami Bot
2018-12-13 07:52:55 +00:00
parent 7221caf731
commit 157afea86b
9 changed files with 261 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
FROM bitnami/oraclelinux-extras:7-r196
LABEL maintainer "Bitnami <containers@bitnami.com>"
# Install required system packages and dependencies
RUN install_packages bzip2-libs cyrus-sasl-lib freetds freetype glibc gmp gnutls keyutils-libs krb5-libs libcom_err libcurl libffi libgcc libgcrypt libgpg-error libicu libidn libjpeg-turbo libmcrypt libmemcached libpng libselinux libssh2 libstdc++ libtasn1 libtidy libxml2 libxslt ncurses-libs nettle nspr nss nss-softokn-freebl nss-util openldap openssl-libs p11-kit pcre postgresql-libs readline xz-libs zlib
RUN bitnami-pkg unpack nginx-1.14.2-20 --checksum a977fe88500927549540238545e84148137557d100ec5550e74c80535c784f96
RUN bitnami-pkg unpack php-7.1.25-20 --checksum 32a1c5bff48b141be69c9272c662f23a66285b0759095315abe19de5b452a56e
RUN bitnami-pkg unpack mysql-client-10.1.37-20 --checksum 916d5a9a191d3a704d9c586a83d8a79348d298e21dff4754feb47a01bf2e5f26
RUN bitnami-pkg unpack drupal-8.6.4-20 --checksum 49589db97e8c7bb1dbeea2d17df7902e9dee6a95f6a1b989266f6215fd3f4752
RUN ln -sf /dev/stdout /opt/bitnami/nginx/logs/access.log
RUN ln -sf /dev/stderr /opt/bitnami/nginx/logs/error.log
COPY rootfs /
ENV ALLOW_EMPTY_PASSWORD="no" \
BITNAMI_APP_NAME="drupal-nginx" \
BITNAMI_IMAGE_VERSION="8.6.4-ol-7-r0" \
DRUPAL_DATABASE_NAME="bitnami_drupal" \
DRUPAL_DATABASE_PASSWORD="" \
DRUPAL_DATABASE_USER="bn_drupal" \
DRUPAL_EMAIL="user@example.com" \
DRUPAL_HTTPS_PORT="443" \
DRUPAL_HTTP_PORT="80" \
DRUPAL_PASSWORD="bitnami" \
DRUPAL_PROFILE="standard" \
DRUPAL_USERNAME="user" \
MARIADB_HOST="mariadb" \
MARIADB_PORT_NUMBER="3306" \
MARIADB_ROOT_PASSWORD="" \
MARIADB_ROOT_USER="root" \
MYSQL_CLIENT_CREATE_DATABASE_NAME="" \
MYSQL_CLIENT_CREATE_DATABASE_PASSWORD="" \
MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES="ALL" \
MYSQL_CLIENT_CREATE_DATABASE_USER="" \
NGINX_DAEMON_GROUP="daemon" \
NGINX_DAEMON_USER="daemon" \
NGINX_HTTPS_PORT_NUMBER="443" \
NGINX_HTTP_PORT_NUMBER="80" \
PATH="/opt/bitnami/nginx/sbin:/opt/bitnami/php/bin:/opt/bitnami/php/sbin:/opt/bitnami/mysql/bin:/opt/bitnami/drupal/vendor/bin:$PATH"
EXPOSE 80 443
ENTRYPOINT [ "/app-entrypoint.sh" ]
CMD [ "./run.sh" ]

View File

@@ -0,0 +1,32 @@
version: '2'
services:
mariadb:
image: 'bitnami/mariadb:latest'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_drupal
- MARIADB_DATABASE=bitnami_drupal
volumes:
- 'mariadb_data:/bitnami'
drupal:
image: 'bitnami/drupal-nginx:8-ol-7'
environment:
- MARIADB_HOST=mariadb
- MARIADB_PORT_NUMBER=3306
- DRUPAL_DATABASE_USER=bn_drupal
- DRUPAL_DATABASE_NAME=bitnami_drupal
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '80:80'
- '443:443'
volumes:
- 'drupal_data:/bitnami/drupal'
- './drupal-vhosts.conf:/bitnami/nginx/conf/vhosts/drupal-vhosts.conf'
depends_on:
- mariadb
volumes:
mariadb_data:
driver: local
drupal_data:
driver: local

View File

@@ -0,0 +1,85 @@
server {
listen 0.0.0.0:80;
server_name myapp.example.com;
root /opt/bitnami/drupal;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ ^/sites/.*/private/ {
return 403;
}
# Block access to scripts in site files directory
location ~ ^/sites/[^/]+/files/.*\.php$ {
deny all;
}
# Allow "Well-Known URIs" as per RFC 5785
location ~* ^/.well-known/ {
allow all;
}
# Block access to "hidden" files and directories whose names begin with a
# period. This includes directories used by version control systems such
# as Subversion or Git to store control files.
location ~ (^|/)\. {
return 403;
}
location / {
try_files $uri /index.php?$query_string;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
# Don't allow direct access to PHP files in the vendor directory.
location ~ /vendor/.*\.php$ {
deny all;
return 404;
}
# The laxer rule will continue to work if Drupal uses this new URL
# pattern with front controllers other than update.php in a future
# release.
location ~ \.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(|/.*)$;
include fastcgi_params;
# Block httpoxy attacks. See https://httpoxy.org/.
fastcgi_param HTTP_PROXY "";
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param QUERY_STRING $query_string;
fastcgi_intercept_errors on;
# PHP 7 socket location.
fastcgi_pass localhost:9000;
}
# Fighting with Styles? This little gem is amazing.
location ~ ^/sites/.*/files/styles/ {
try_files $uri @rewrite;
}
# Handle private files through Drupal. Private file's path can come
# with a language prefix.
location ~ ^(/[a-z\-]+)?/system/files/ {
try_files $uri /index.php?$query_string;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
try_files $uri @rewrite;
expires max;
log_not_found off;
}
}

View File

@@ -0,0 +1,14 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "./run.sh" ]]; then
. /init.sh
nami_initialize nginx php mysql-client drupal
info "Starting drupal... "
fi
exec tini -- "$@"

View File

@@ -0,0 +1,13 @@
{
"databaseName": "{{$global.env.DRUPAL_DATABASE_NAME}}",
"databasePassword": "{{$global.env.DRUPAL_DATABASE_PASSWORD}}",
"databaseServerHost": "{{$global.env.MARIADB_HOST}}",
"databaseServerPort": "{{$global.env.MARIADB_PORT_NUMBER}}",
"databaseUser": "{{$global.env.DRUPAL_DATABASE_USER}}",
"email": "{{$global.env.DRUPAL_EMAIL}}",
"httpPort": "{{$global.env.DRUPAL_HTTP_PORT}}",
"httpsPort": "{{$global.env.DRUPAL_HTTPS_PORT}}",
"installationProfile": "{{$global.env.DRUPAL_PROFILE}}",
"password": "{{$global.env.DRUPAL_PASSWORD}}",
"username": "{{$global.env.DRUPAL_USERNAME}}"
}

View File

@@ -0,0 +1,31 @@
#!/bin/bash
##
## @brief Helper function to show an error when a password is empty and exit
## param $1 Input name
##
empty_password_error() {
error "The $1 environment variable is empty or not set. Set the environment variable ALLOW_EMPTY_PASSWORD=yes to allow the container to be started with blank passwords. This is recommended only for development."
exit 1
}
##
## @brief Helper function to show a warning when the ALLOW_EMPTY_PASSWORD flag is enabled
##
empty_password_enabled_warn() {
warn "You set the environment variable ALLOW_EMPTY_PASSWORD=${ALLOW_EMPTY_PASSWORD}. For safety reasons, do not use this flag in a production environment."
}
# Validate passwords
if [[ "$ALLOW_EMPTY_PASSWORD" =~ ^(yes|Yes|YES)$ ]]; then
empty_password_enabled_warn
else
# Database creation by MySQL client
if [[ -n "$MYSQL_CLIENT_CREATE_DATABASE_USER" && -z "$MYSQL_CLIENT_CREATE_DATABASE_PASSWORD" ]]; then
empty_password_error MYSQL_CLIENT_CREATE_DATABASE_PASSWORD
fi
# Drupal database
if [[ -z "$DRUPAL_DATABASE_PASSWORD" ]]; then
empty_password_error DRUPAL_DATABASE_PASSWORD
fi
fi

View File

@@ -0,0 +1,11 @@
{
"allowEmptyPassword": "{{$global.env.ALLOW_EMPTY_PASSWORD}}",
"createDatabaseName": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_NAME}}",
"createDatabasePassword": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PASSWORD}}",
"createDatabasePrivileges": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_PRIVILEGES}}",
"createDatabaseUser": "{{$global.env.MYSQL_CLIENT_CREATE_DATABASE_USER}}",
"host": "{{$global.env.MARIADB_HOST}}",
"port": "{{$global.env.MARIADB_PORT_NUMBER}}",
"rootPassword": "{{$global.env.MARIADB_ROOT_PASSWORD}}",
"rootUser": "{{$global.env.MARIADB_ROOT_USER}}"
}

View File

@@ -0,0 +1,6 @@
{
"httpPort": "{{$global.env.NGINX_HTTP_PORT_NUMBER}}",
"httpsPort": "{{$global.env.NGINX_HTTPS_PORT_NUMBER}}",
"systemGroup": "{{$global.env.NGINX_DAEMON_GROUP}}",
"systemUser": "{{$global.env.NGINX_DAEMON_USER}}"
}

View File

@@ -0,0 +1,26 @@
#!/bin/bash
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
NGINX_INSTALLDIR="/opt/bitnami/nginx"
NGINX_CONF_DIR="${NGINX_INSTALLDIR}/conf"
PHP_INSTALLDIR="/opt/bitnami/php"
PHP_CONF_DIR="${PHP_INSTALLDIR}/conf"
PHP_TEMP_DIR="${PHP_INSTALLDIR}/tmp"
_forwardTerm () {
echo "Caugth signal SIGTERM, passing it to child processes..."
cpids=$(pgrep -P $$ | xargs)
kill -15 "$cpids" 2> /dev/null
wait
exit $?
}
trap _forwardTerm TERM
info "Starting php-fpm..."
su daemon -s /bin/bash -c "${PHP_INSTALLDIR}/sbin/php-fpm --pid ${PHP_TEMP_DIR}/php5-fpm.pid --fpm-config ${PHP_CONF_DIR}/php-fpm.conf --prefix ${PHP_INSTALLDIR} -c ${PHP_CONF_DIR}/php.ini" &
info "Starting nginx..."
nginx -c "${NGINX_CONF_DIR}/nginx.conf" -g "daemon off;"