Skip to content
Snippets Groups Projects
settings.php 1.57 KiB
Newer Older
bcweaver's avatar
bcweaver committed
<?php

/**
 * Load services definition file.
 */
$settings['container_yamls'][] = __DIR__ . '/services.yml';

/**
 * Include the Pantheon-specific settings file.
 *
 * n.b. The settings.pantheon.php file makes some changes
 *      that affect all envrionments that this site
 *      exists in.  Always include this file, even in
 *      a local development environment, to ensure that
 *      the site settings remain consistent.
 */
include __DIR__ . "/settings.pantheon.php";

/**
 * Place the config directory outside of the Drupal root.
 */
if(!empty($_ENV['FILEMOUNT'])) {
  error_log("Config sync dir: _ENV[FILEMOUNT] exists, using it.");
  $config_directories = array(
    CONFIG_SYNC_DIRECTORY => DRUPAL_ROOT . '/' . $_ENV['FILEMOUNT'] . '/private/config',
  );
}
else if (is_dir($_ENV['HOME'] . '/files/private/config')) {
  error_log("Config sync dir: _ENV[HOME]/files/private/config exists, using this.");
  $config_directories = array(
    CONFIG_SYNC_DIRECTORY => $_ENV['HOME'] . '/files/private/config',
  );
}
else {
  error_log("Config sync dir: fell through to default.");
  $config_directories = array(
    CONFIG_SYNC_DIRECTORY => DRUPAL_ROOT . '/sites/default/files/private/config',
  );
}
error_log("Config sync dir: " . $config_directories[CONFIG_SYNC_DIRECTORY]);
bcweaver's avatar
bcweaver committed
/**
 * If there is a local settings file, then include it
 */
$local_settings = __DIR__ . "/settings.local.php";
if (file_exists($local_settings)) {
  include $local_settings;
}

/**
 * Always install the 'standard' profile to stop the installer from
 * modifying settings.php.
 */
$settings['install_profile'] = 'minimal';