From f48a2eb0d2343ce8c4e3a0b93d2153c93a5cabbf Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 2 Dec 2024 12:42:21 +0200 Subject: [PATCH 1/3] UHF-10549: Move elasticsearch settings to settings.php --- public/sites/default/all.settings.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/public/sites/default/all.settings.php b/public/sites/default/all.settings.php index 1dfa5dda..b40d0fe3 100644 --- a/public/sites/default/all.settings.php +++ b/public/sites/default/all.settings.php @@ -5,16 +5,6 @@ * Contains site specific overrides. */ -if (getenv('ELASTIC_URL')) { - $config['search_api.server.default']['backend_config']['connector_config']['url'] = getenv('ELASTIC_URL'); - - if (getenv('ELASTIC_USER') && getenv('ELASTIC_PASSWORD')) { - $config['search_api.server.default']['backend_config']['connector'] = 'basicauth'; - $config['search_api.server.default']['backend_config']['connector_config']['username'] = getenv('ELASTIC_USER'); - $config['search_api.server.default']['backend_config']['connector_config']['password'] = getenv('ELASTIC_PASSWORD'); - } -} - if (getenv('INFOFINLAND_UI_URL')) { $config['next.next_site.infofinland_ui']['base_url'] = getenv('INFOFINLAND_UI_URL'); $config['next.next_site.infofinland_ui']['preview_url'] = getenv('INFOFINLAND_UI_PREVIEW_URL'); From 6891c7cadecef97de053e6610fa5ff2bd5e4b1c9 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 2 Dec 2024 12:43:20 +0200 Subject: [PATCH 2/3] UHF-10549: Remove hook from old elasticsearch_connector version --- .../infofinland_common/infofinland_common.module | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/public/modules/custom/infofinland_common/infofinland_common.module b/public/modules/custom/infofinland_common/infofinland_common.module index 3758807d..add86ac3 100644 --- a/public/modules/custom/infofinland_common/infofinland_common.module +++ b/public/modules/custom/infofinland_common/infofinland_common.module @@ -568,16 +568,6 @@ function infofinland_common_entity_type_alter(array &$entity_types) { } } -/** - * Implements hook_elasticsearch_connector_load_library_options_alter(). - */ -function infofinland_common_elasticsearch_connector_load_library_options_alter(&$options, &$context) { - // Set cURL options to trust self-signed certificate. - // @todo instead of disabling verification, set CURLOPT_SSLCERT. - $options['curl'][CURLOPT_SSL_VERIFYPEER] = FALSE; - $options['curl'][CURLOPT_SSL_VERIFYHOST] = FALSE; -} - /** * Implements hook_preprocess_HOOK(). */ From f27946ef54b9b9470cc02ad7d25339063a8c5485 Mon Sep 17 00:00:00 2001 From: Santeri Hurnanen Date: Mon, 2 Dec 2024 14:29:52 +0200 Subject: [PATCH 3/3] UHF-10549: Rename environment variable --- public/sites/default/all.settings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/sites/default/all.settings.php b/public/sites/default/all.settings.php index b40d0fe3..e02948fc 100644 --- a/public/sites/default/all.settings.php +++ b/public/sites/default/all.settings.php @@ -28,7 +28,7 @@ 'SENTRY_ENVIRONMENT', // Project specific variables. 'DRUPAL_PREVIEW_SECRET', - 'ELASTIC_URL', + 'ELASTICSEARCH_URL', 'ELASTIC_USER', 'ELASTIC_PASSWORD', 'INFOFINLAND_UI_PREVIEW_URL',