diff --git a/template/docroot/sites/default/settings/base.settings.php b/template/docroot/sites/default/settings/base.settings.php index 045cd29e7..04f68716f 100644 --- a/template/docroot/sites/default/settings/base.settings.php +++ b/template/docroot/sites/default/settings/base.settings.php @@ -23,12 +23,14 @@ * Cloud Free tier vs Acquia Cloud Professional and Enterprise. */ $ah_env = isset($_ENV['AH_SITE_ENVIRONMENT']) ? $_ENV['AH_SITE_ENVIRONMENT'] : NULL; +$ah_group = isset($_ENV['AH_SITE_GROUP']) ? $_ENV['AH_SITE_GROUP'] : NULL; $is_ah_env = (bool) $ah_env; $is_ah_prod_env = ($ah_env == 'prod' || $ah_env == '01live'); $is_ah_stage_env = ($ah_env == 'test' || $ah_env == '01test'); $is_ah_dev_cloud = (!empty($_SERVER['HTTP_HOST']) && strstr($_SERVER['HTTP_HOST'], 'devcloud')); $is_ah_dev_env = (preg_match('/^dev[0-9]*$/', $ah_env) || $ah_env == '01dev'); -$is_acsf = (isset($_ENV['AH_SITE_GROUP']) && file_exists("/mnt/files/{$_ENV['AH_SITE_GROUP']}.$ah_env/files-private/sites.json")); +$is_acsf = (!empty($ah_group) && file_exists("/mnt/files/$ah_group.$ah_env/files-private/sites.json")); +$acsf_db_name = $is_acsf ? $GLOBALS['gardens_site_settings']['conf']['acsf_db_name'] : NULL; $is_local_env = !$is_ah_env; /** diff --git a/template/docroot/sites/default/settings/filesystem.settings.php b/template/docroot/sites/default/settings/filesystem.settings.php index 053f5872b..bca2a758e 100644 --- a/template/docroot/sites/default/settings/filesystem.settings.php +++ b/template/docroot/sites/default/settings/filesystem.settings.php @@ -7,10 +7,12 @@ $settings['file_public_path'] = 'sites/default/files'; -/** - * Acquia cloud file paths. - */ -if ($is_ah_env) { +// ACSF file paths. +if ($is_acsf) { + $settings['file_private_path'] = "/mnt/gfs/$ah_group.$ah_env/files-private/$acsf_db_name"; +} +// Acquia cloud file paths. +elseif ($is_ah_env) { $config['system.file']['path']['temporary'] = '/mnt/tmp/' . $_ENV['AH_SITE_NAME']; - $settings['file_private_path'] = '/mnt/files/' . $_ENV['AH_SITE_NAME'] . '/files-private'; + $settings['file_private_path'] = "/mnt/files/$ah_group.$ah_env/files-private"; }