From 3f1de6346fd633872ccf84559df409706792eff0 Mon Sep 17 00:00:00 2001 From: caseyfw Date: Tue, 5 Sep 2017 10:09:47 +0930 Subject: [PATCH] Makes redis host location configurable. --- src/Handler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Handler.php b/src/Handler.php index 64745e3..3fa5428 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -141,7 +141,7 @@ public function createSettingsFile() "\$settings['shepherd_token'] = getenv('SHEPHERD_TOKEN_FILE') ? file_get_contents(getenv('SHEPHERD_TOKEN_FILE')) : getenv('SHEPHERD_TOKEN');\n\n" . "if (getenv('REDIS_ENABLED')) {\n" . " \$settings['redis.connection']['interface'] = 'PhpRedis';\n" . - " \$settings['redis.connection']['host'] = 'redis';\n" . + " \$settings['redis.connection']['host'] = getenv('REDIS_HOST') ?: 'redis';\n" . " \$settings['cache']['default'] = 'cache.backend.redis';\n\n" . " // Always set the fast backend for bootstrap, discover and config, otherwise\n" . " // this gets lost when redis is enabled.\n" . @@ -152,7 +152,7 @@ public function createSettingsFile() " if (!isset(\$GLOBALS['install_state'])) {\n" . " \$settings['container_yamls'][] = 'modules/contrib/redis/example.services.yml';\n" . " }\n" . - "}\n\n" . + "}\n" . "/**\n * END SHEPHERD CONFIG\n */\n" . "\n" . "/**\n * START LOCAL CONFIG\n */\n" .