Commit 8d08ee73 authored by Jonathan Hunt's avatar Jonathan Hunt

Add settings for Catalyst Cloud Staging.

parent 06590617
......@@ -7,20 +7,16 @@
// Custom string overrides.
$conf['locale_custom_strings_en'][''] = array(
'Request new password' => 'Forgot your password?',
'You are not authorized to access this page.' => 'You are not authorised to access this page.<br/><br/>If you have an account, please login. If you do not have an account, you can <a href="/user/register">register an account</a>.',
'Sorry, unrecognized username or password. <a href="@password">Have you forgotten your password?</a>' => 'Sorry, unrecognised email or password. <a href="@password">Have you forgotten your password?</a>',
'You are not authorized to access this page.' => 'You are not authorised to access this page.',
);
ini_set('xdebug.max_nesting_level', 200);
// c/- PreviousNext
// Memory allocation to be 256MB. This is to cover cron etc.
if (isset($_GET['q']) && (strpos($_GET['q'], 'admin') === 0 || strpos($_GET['q'], 'en/admin') === 0)) {
ini_set('memory_limit', '512M');
}
// Node edit pages are memory heavy too.
if (isset($_GET['q']) && preg_match('@^node\/([0-9]+)\/edit$@', $_GET['q'])) {
ini_set('memory_limit', '256M');
// Force SSL when available.
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$_SERVER['HTTPS'] = 'on';
}
// Put files shared between dev and prod environments in here.
......@@ -34,6 +30,9 @@ if (!isset($environment)) {
elseif (strpos($_SERVER['HTTP_HOST'], 'd7.climbnz.org.nz') !== FALSE) {
$environment = 'staging';
}
elseif (strpos($_SERVER['HTTP_HOST'], 'climbnz.catalystdemo.net.nz') !== FALSE) {
$environment = 'staging-catalyst';
}
else {
// Default to production.
$environment = 'production';
......@@ -41,6 +40,57 @@ if (!isset($environment)) {
}
switch ($environment) {
case 'staging-catalyst':
ini_set('error_reporting', E_ALL); // ^E_WARNING
ini_set('display_errors', TRUE);
ini_set('max_execution_time', 60);
// c/- PreviousNext
// Memory allocation to be 256MB. This is to cover cron etc.
if (isset($_GET['q']) && (strpos($_GET['q'], 'admin') === 0 || strpos($_GET['q'], 'en/admin') === 0)) {
ini_set('memory_limit', '196M');
}
// Node edit pages are memory heavy too.
if (isset($_GET['q']) && preg_match('@^node\/([0-9]+)\/edit$@', $_GET['q'])) {
ini_set('memory_limit', '196M');
}
// Memory allocation to be 256MB. This is to cover cron etc.
if (isset($_GET['q']) && (strpos($_GET['q'], 'batch') === 0)) {
ini_set('memory_limit', '196M');
}
// Each element of this array is the IP address of any of your reverse proxies.
$conf['reverse_proxy_addresses'] = array('127.0.0.1');
// Connection details for Catalyst Squid proxies.
$conf['proxy_server'] = 'ext-proxy-staging.catalyst.net.nz';
$conf['proxy_port'] = '3128';
$conf['proxy_exceptions'] = array('cat-chcsc-staging-solr.servers.catalyst.net.nz');
$conf['omit_vary_cookie'] = true;
$conf['file_directory_path'] = 'sites/default/files';
//$conf['file_public_path'] = $conf['file_directory_path'];
$conf['flog_enabled'] = TRUE;
$conf['flog_path'] = $conf['file_directory_path'];
//$conf['flog_file'] = 'drupal-7eb632827cb0dc1f255b7d1957a07c9737ba2ce9.log';
// File path, used in migrate_climbnz/migrate_climbnz.migrate.inc
// sites/climbnz.org.nz/files gets appended.
$conf['migrate_climbnz_source_dir'] = '/home/nzac/climbnz.org.nz';
// Configure environment module.
$conf['environment_indicator_overwrite'] = TRUE;
$conf['environment_indicator_overwritten_name'] = 'STAGING';
$conf['environment_indicator_overwritten_color'] = '#fa630a'; // orange
$conf['environment_indicator_overwritten_drawer_color'] = '#333333';
$conf['environment_indicator_overwritten_text_color'] = '#ffffff';
$conf['environment_indicator_overwritten_position'] = 'top';
$conf['environment_indicator_overwritten_fixed'] = FALSE;
break;
case 'staging':
ini_set('error_reporting', E_ALL); // ^E_WARNING
ini_set('display_errors', TRUE);
......@@ -75,13 +125,15 @@ switch ($environment) {
$conf['file_directory_path'] = 'sites/default/files';
//$conf['file_public_path'] = $conf['file_directory_path'];
// D6 files
$conf['migrate_climbnz_source_dir'] = '/Users/jonathan/Sites/climbnz.local/';
$conf['flog_enabled'] = TRUE;
$conf['flog_path'] = $conf['file_directory_path'];
$conf['flog_file'] = 'drupal.log';
// Source file path, used in migrate_climbnz/migrate_climbnz.migrate.inc
$conf['migrate_climbnz_source_dir'] = '/Users/jonathan/Sites/climbnz.local';
$conf['migrate_climbnz_source_dir'] = '/Users/jonathan/Sites/climbnz.local/';
// Configure environment module.
$conf['environment_indicator_overwrite'] = TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment