Skip to content

Commit

Permalink
fix: Refactor some things that break prod.
Browse files Browse the repository at this point in the history
Ensure local overrides happen *before* Ansible ones.
  • Loading branch information
cafuego authored Oct 25, 2023
1 parent 83675c2 commit 50e501c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions docker/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,21 @@
'collation' => getenv('DRUPAL_DB_COLLATION'),
]);

// Load everything else from snippets under /srv/www/shared/settings.
// @TODO: Use some sort of key/value store.
// Inject some settings for local use and/or Drupal sanity checks.
$settings['config_sync_directory'] = dirname($app_root) . '/config';
$settings['hash_salt'] = 'cannabidol-chloride';

/**
* Load generated settings.
*
* Load everything else from snippets under /srv/www/shared/settings, where Ansible
* puts them. Do *not* add any (local) settings overrides below this block, as they
* will then override the Ansible-managed ones!
*
* @TODO: Use some sort of key/value store or vault.
*/
if (file_exists('/srv/www/shared/settings')) {
foreach (glob('/srv/www/shared/settings/settings.*.php') as $filename) {
include $filename;
}
}

$settings['config_sync_directory'] = dirname($app_root) . '/config';

0 comments on commit 50e501c

Please sign in to comment.