Skip to content

Commit

Permalink
Fixed default directory config sync path with global settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jan 23, 2025
1 parent c8b0e63 commit 8444f16
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 25 deletions.
25 changes: 0 additions & 25 deletions docroot/sites/settings/early.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,7 @@

use Acquia\Blt\Robo\Common\EnvironmentDetector;

// When the encryption environment variable is not provided (local/ci/etc),
// fake the encryption string so that the site doesn't break.
if (!getenv('STANFORD_ENCRYPT')) {
putenv("STANFORD_ENCRYPT=" . substr(file_get_contents("$repo_root/salt.txt"), 0, 32));
}

/**
* An example global include file.
*
* To use this file, rename to global.settings.php.
*/

$settings['file_temp_path'] = '/tmp';

if (EnvironmentDetector::isAhEnv()) {
// Set the temp directory as per https://docs.acquia.com/acquia-cloud/manage/files/broken/
$settings['file_temp_path'] = '/mnt/gfs/' . EnvironmentDetector::getAhGroup() . '.' . EnvironmentDetector::getAhEnv() . '/tmp';
$settings['letsencrypt_challenge_directory'] = $settings['file_temp_path'];

// Lock the UI to read_only when on production or test in Acquia.
if (
(EnvironmentDetector::isAhProdEnv() || EnvironmentDetector::isAhStageEnv())
Expand All @@ -43,13 +25,6 @@
}
}

/**
* This can be overridden for individual sites. Add or modify this value in
* `docroot/sites/{site-name}/settings/includes.settings.php` for the respective
* site. See related information below.
*/
$settings['config_sync_directory'] = DRUPAL_ROOT . '/profiles/custom/stanford_profile/config/sync';

/**
* Include settings files in docroot/sites/settings.
*
Expand Down
29 changes: 29 additions & 0 deletions docroot/sites/settings/global.settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Acquia\Blt\Robo\Common\EnvironmentDetector;

/**
* This can be overridden for individual sites. Add or modify this value in
* `docroot/sites/{site-name}/settings/includes.settings.php` for the respective
* site. See related information below.
*/
$settings['config_sync_directory'] = DRUPAL_ROOT . '/profiles/custom/stanford_profile/config/sync';

// When the encryption environment variable is not provided (local/ci/etc),
// fake the encryption string so that the site doesn't break.
if (!getenv('STANFORD_ENCRYPT')) {
putenv("STANFORD_ENCRYPT=" . substr(file_get_contents("$repo_root/salt.txt"), 0, 32));
}

/**
* An example global include file.
*
* To use this file, rename to global.settings.php.
*/

$settings['file_temp_path'] = '/tmp';

if (EnvironmentDetector::isAhEnv()) {
// Set the temp directory as per https://docs.acquia.com/acquia-cloud/manage/files/broken/
$settings['file_temp_path'] = '/mnt/gfs/' . EnvironmentDetector::getAhGroup() . '.' . EnvironmentDetector::getAhEnv() . '/tmp';
}

0 comments on commit 8444f16

Please sign in to comment.