Skip to content

Commit 6b99506

Browse files
Update configuration
1 parent 7d2cb57 commit 6b99506

3 files changed

Lines changed: 56 additions & 43 deletions

File tree

composer.lock

Lines changed: 44 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
disable_email_sending: true
22
disable_user_password: true
33
user_expire: true
4+
use_mock_responses: false
45
logger: true

public/sites/default/settings.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,17 @@ function drupal_get_env(string|array $variables) : mixed {
365365
}
366366
}
367367

368+
// Elasticsearch suggestions server config. Etusivu elasticsearch instance is
369+
// shared between all core sites for indexing suggestions data.
370+
if (getenv('ELASTICSEARCH_ETUSIVU_URL')) {
371+
$config['search_api.server.etusivu']['backend_config']['connector_config']['url'] = getenv('ELASTICSEARCH_ETUSIVU_URL');
372+
373+
if (getenv('ELASTICSEARCH_ETUSIVU_WRITER_USER') && getenv('ELASTICSEARCH_ETUSIVU_WRITER_PASSWORD')) {
374+
$config['search_api.server.etusivu']['backend_config']['connector'] = 'helfi_connector';
375+
$config['search_api.server.etusivu']['backend_config']['connector_config']['username'] = getenv('ELASTICSEARCH_ETUSIVU_WRITER_USER');
376+
$config['search_api.server.etusivu']['backend_config']['connector_config']['password'] = getenv('ELASTICSEARCH_ETUSIVU_WRITER_PASSWORD');
377+
}
378+
}
368379

369380
// Supported values: https://github.com/Seldaek/monolog/blob/main/doc/01-usage.md#log-levels.
370381
$default_log_level = getenv('APP_ENV') === 'production' ? 'info' : 'debug';

0 commit comments

Comments
 (0)