From 1fcc08dc03670cda803d5077472c50de85659f84 Mon Sep 17 00:00:00 2001 From: Vincent Gao Date: Tue, 6 Aug 2024 13:21:51 +1000 Subject: [PATCH] Update settings.php for data_pipelines url --- images/php/settings.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/images/php/settings.php b/images/php/settings.php index c95a5ff0..c12663a4 100755 --- a/images/php/settings.php +++ b/images/php/settings.php @@ -347,7 +347,14 @@ } // Override data_pipelines url. -$config['data_pipelines.dataset_destination.sdp_elasticsearch']['destinationSettings']['url'] = (getenv('SEARCH_HASH') && getenv('SEARCH_URL')) ? sprintf('http://%s.%s', getenv('SEARCH_HASH'), getenv('SEARCH_URL')) : "http://elasticsearch:9200"; +$elasticsearch_url = (getenv('SEARCH_HASH') && getenv('SEARCH_URL')) ? sprintf('http://%s.%s', getenv('SEARCH_HASH'), getenv('SEARCH_URL')) : "http://elasticsearch:9200"; +$data_pipeline_configs = [ + 'sdp_elasticsearch', + 'sdp_elasticsearch_v1', +]; +foreach ($data_pipeline_configs as $config_name) { + $config["data_pipelines.dataset_destination.{$config_name}"]['destinationSettings']['url'] = $elasticsearch_url; +} // Configure tide_logs. if (getenv('TIDE_LOGS_UDPLOG_HOST')) {