Skip to content

Commit

Permalink
Update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hel-platta-automation authored and github-actions[bot] committed Dec 3, 2024
1 parent 8e606d1 commit 4d4f843
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .platform/schema
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
12
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"dg/bypass-finals": "^1.5",
"drupal/coder": "^8.3",
"drupal/core-dev": "^10.0",
"jangregor/phpstan-prophecy": "^1.0",
Expand Down
123 changes: 86 additions & 37 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion conf/cmi/language/fi/social_media.settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
social_media:
facebook_share:
text: 'Jaa Facebook-palvelussa'
api_url: 'http://www.facebook.com/share.php?u=[current-page:url]&title=[current-page:title]'
api_url: 'https://www.facebook.com/share.php?u=[current-page:url]&title=[current-page:title]'
attributes: "target|_blank\r\nclass|facebook-share"
linkedin:
text: 'Jaa LinkedIn-palvelussa'
Expand Down
2 changes: 1 addition & 1 deletion conf/cmi/language/sv/social_media.settings.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
social_media:
facebook_share:
text: 'Dela på Facebook'
api_url: 'http://www.facebook.com/share.php?u=[current-page:url]&title=[current-page:title]'
api_url: 'https://www.facebook.com/share.php?u=[current-page:url]&title=[current-page:title]'
attributes: "target|_blank\r\nclass|facebook-share"
linkedin:
text: 'Dela på Linkedin'
Expand Down
32 changes: 22 additions & 10 deletions public/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ function drupal_get_env(string|array $variables) : mixed {
'helfi_api_base_revision',
];
foreach ($queues as $queue) {
$settings['queue_service_' . $queue] = 'queue.stomp.default';
// $settings['queue_service_' . $queue] = 'queue.stomp.default';
}
// You must configure project specific queues manually in 'all.settings.php'
// file.
Expand Down Expand Up @@ -359,6 +359,27 @@ function drupal_get_env(string|array $variables) : mixed {
'additionalFiles' => [],
];

// Elasticsearch server config.
if (getenv('ELASTICSEARCH_URL')) {
$config['search_api.server.default']['backend_config']['connector_config']['url'] = getenv('ELASTICSEARCH_URL');

if (getenv('ELASTIC_USER') && getenv('ELASTIC_PASSWORD')) {
$config['search_api.server.default']['backend_config']['connector'] = 'helfi_connector';
$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');
}
}


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

// Turn sentry JS error tracking on if SENTRY_DSN_PUBLIC is defined.
if (getenv('SENTRY_DSN_PUBLIC')) {
$config['raven.settings']['javascript_error_handler'] = TRUE;
}

// Environment specific overrides.
if (file_exists(__DIR__ . '/all.settings.php')) {
// phpcs:ignore
Expand Down Expand Up @@ -389,15 +410,6 @@ function drupal_get_env(string|array $variables) : mixed {
}
}

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

// Turn sentry JS error tracking on if SENTRY_DSN_PUBLIC is defined.
if (getenv('SENTRY_DSN_PUBLIC')) {
$config['raven.settings']['javascript_error_handler'] = TRUE;
}

/**
* Deployment identifier.
*
Expand Down

0 comments on commit 4d4f843

Please sign in to comment.