From 338d106d6793dafc2ee3e6d24eb161eace5bd610 Mon Sep 17 00:00:00 2001 From: Peter Schiffer Date: Thu, 22 Nov 2018 19:06:34 +0100 Subject: [PATCH] Add MYSQL_ENV_MYSQL_HOST and MYSQL_ENV_MYSQL_PORT variables --- pdns-admin-uwsgi-ngoduykhanh/docker-cmd.sh | 4 ++-- pdns/docker-cmd.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pdns-admin-uwsgi-ngoduykhanh/docker-cmd.sh b/pdns-admin-uwsgi-ngoduykhanh/docker-cmd.sh index 53e537b..82775a3 100755 --- a/pdns-admin-uwsgi-ngoduykhanh/docker-cmd.sh +++ b/pdns-admin-uwsgi-ngoduykhanh/docker-cmd.sh @@ -3,8 +3,8 @@ set -euo pipefail # Configure mysql env vars -: "${PDNS_ADMIN_SQLA_DB_HOST:='mysql'}" -: "${PDNS_ADMIN_SQLA_DB_PORT:='3306'}" +: "${PDNS_ADMIN_SQLA_DB_HOST:='${MYSQL_ENV_MYSQL_HOST:-mysql}'}" +: "${PDNS_ADMIN_SQLA_DB_PORT:='${MYSQL_ENV_MYSQL_PORT:-3306}'}" : "${PDNS_ADMIN_SQLA_DB_USER:='${MYSQL_ENV_MYSQL_USER:-root}'}" if [ "${PDNS_ADMIN_SQLA_DB_USER}" = "'root'" ]; then : "${PDNS_ADMIN_SQLA_DB_PASSWORD:='$MYSQL_ENV_MYSQL_ROOT_PASSWORD'}" diff --git a/pdns/docker-cmd.sh b/pdns/docker-cmd.sh index 321e7f8..6d7ed71 100755 --- a/pdns/docker-cmd.sh +++ b/pdns/docker-cmd.sh @@ -3,8 +3,8 @@ set -euo pipefail # Configure mysql env vars -: "${PDNS_gmysql_host:=mysql}" -: "${PDNS_gmysql_port:=3306}" +: "${PDNS_gmysql_host:=${MYSQL_ENV_MYSQL_HOST:-mysql}}" +: "${PDNS_gmysql_port:=${MYSQL_ENV_MYSQL_PORT:-3306}}" : "${PDNS_gmysql_user:=${MYSQL_ENV_MYSQL_USER:-root}}" if [ "${PDNS_gmysql_user}" = 'root' ]; then : "${PDNS_gmysql_password:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}"