From aa544a725fe99fceadf38de423a5bc918b8b43d3 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sat, 3 Feb 2018 20:47:07 +1300 Subject: [PATCH] Issue 6147: Docker ROUNDCUBEMAIL_DB_TYPE not properly managed --- docker/docker-entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index f18f74ad3..bad39cd63 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -15,7 +15,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then echo >&2 "Complete! ROUNDCUBEMAIL has been successfully copied to $PWD" fi - if [ ! -z "${!POSTGRES_ENV_POSTGRES_*}" ]; then + if [ ! -z "${!POSTGRES_ENV_POSTGRES_*}" ] || [ $ROUNDCUBEMAIL_DB_TYPE == "pgsql" ]; then : "${ROUNDCUBEMAIL_DB_TYPE:=pgsql}" : "${ROUNDCUBEMAIL_DB_HOST:=postgres}" : "${ROUNDCUBEMAIL_DB_USER:=${POSTGRES_ENV_POSTGRES_USER}}" @@ -24,7 +24,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then : "${ROUNDCUBEMAIL_DSNW:=${ROUNDCUBEMAIL_DB_TYPE}://${ROUNDCUBEMAIL_DB_USER}:${ROUNDCUBEMAIL_DB_PASSWORD}@${ROUNDCUBEMAIL_DB_HOST}/${ROUNDCUBEMAIL_DB_NAME}}" /wait-for-it.sh ${ROUNDCUBEMAIL_DB_HOST}:5432 -t 30 - elif [ ! -z "${!MYSQL_ENV_MYSQL_*}" ]; then + elif [ ! -z "${!MYSQL_ENV_MYSQL_*}" ] || [ $ROUNDCUBEMAIL_DB_TYPE == "mysql" ]; then : "${ROUNDCUBEMAIL_DB_TYPE:=mysql}" : "${ROUNDCUBEMAIL_DB_HOST:=mysql}" : "${ROUNDCUBEMAIL_DB_USER:=${MYSQL_ENV_MYSQL_USER:-root}}"