diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index adf9eaa098..c34a8df80a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -2,7 +2,13 @@ set -e if [ -n "$MYSQL_PORT_3306_TCP" ]; then - WORDPRESS_DB_HOST='mysql' + if [ -z "$WORDPRESS_DB_HOST" ]; then + WORDPRESS_DB_HOST='mysql' + else + echo >&2 'warning: both WORDPRESS_DB_HOST and MYSQL_PORT_3306_TCP found' + echo >&2 " Connecting to WORDPRESS_DB_HOST ($WORDPRESS_DB_HOST)" + echo >&2 ' instead of the linked mysql container' + fi fi if [ -z "$WORDPRESS_DB_HOST" ]; then