Skip to content

Commit

Permalink
Merge pull request #790 from City-of-Helsinki/UHF-9392
Browse files Browse the repository at this point in the history
UHF-9392: Deployment preflight checks
  • Loading branch information
tuutti authored Feb 2, 2024
2 parents db8d11b + 84d40f7 commit 1ad3b52
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions public/sites/default/all.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@
$config['helfi_hotjar.settings']['hjid'] = $hotjar_id;
}

if ($drush_options_uri = getenv('DRUSH_OPTIONS_URI')) {
if (str_contains($drush_options_uri, 'www.hel.fi')) {
$config['helfi_proxy.settings']['default_proxy_domain'] = 'www.hel.fi';
}
}

// Elasticsearch settings.
if (getenv('ELASTICSEARCH_URL')) {
$config['elasticsearch_connector.cluster.kymp']['url'] = getenv('ELASTICSEARCH_URL');
Expand All @@ -32,3 +26,31 @@

// Sentry DSN for React.
$config['react_search.settings']['sentry_dsn_react'] = getenv('SENTRY_DSN_REACT');

$additionalEnvVars = [
'AZURE_BLOB_STORAGE_SAS_TOKEN|BLOBSTORAGE_SAS_TOKEN',
'AZURE_BLOB_STORAGE_NAME',
'AZURE_BLOB_STORAGE_CONTAINER',
'DRUPAL_VARNISH_HOST',
'DRUPAL_VARNISH_PORT',
'PROJECT_NAME',
'DRUPAL_API_ACCOUNTS',
'DRUPAL_VAULT_ACCOUNTS',
'REDIS_HOST',
'REDIS_PORT',
'REDIS_PASSWORD',
'TUNNISTAMO_CLIENT_ID',
'TUNNISTAMO_CLIENT_SECRET',
'TUNNISTAMO_ENVIRONMENT_URL',
'SENTRY_DSN',
'SENTRY_ENVIRONMENT',
// Project specific variables.
'ELASTIC_PROXY_URL',
'ELASTICSEARCH_URL',
'ELASTIC_USER',
'ELASTIC_PASSWORD',
'SENTRY_DSN_REACT',
];
foreach ($additionalEnvVars as $var) {
$preflight_checks['environmentVariables'][] = $var;
}

0 comments on commit 1ad3b52

Please sign in to comment.