forked from drupal-composer/drupal-project
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsample.settings.php
80 lines (70 loc) · 2.44 KB
/
sample.settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
$settings['update_free_access'] = FALSE;
$settings['file_private_path'] = '../private';
$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
$settings['file_scan_ignore_directories'] = [
'node_modules',
'bower_components',
];
$settings['entity_update_batch_size'] = 50;
$settings['hash_salt'] = 'asotenuarchqewsmaoeuSNTH56654+';
$settings['trusted_host_patterns'] = [
getenv('DRUPAL_TRUSTED_HOSTS')
];
$databases = [];
$databases['default']['default'] = [
'database' => getenv('DATABASE_NAME'),
'username' => getenv('DATABASE_USERNAME'),
'password' => getenv('DATABASE_PASSWORD'),
'prefix' => '',
'host' => getenv('DATABASE_HOST'),
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
];
$settings['config_sync_directory'] = '../config/default/default';
$site_environment = getenv('SITE_ENV');
$config['config_split.config_split.local']['status'] = FALSE;
$config['config_split.config_split.dev']['status'] = FALSE;
$config['config_split.config_split.stage']['status'] = FALSE;
$config['config_split.config_split.prod']['status'] = FALSE;
switch ($site_environment) {
case 'local':
$config['config_split.config_split.local']['status'] = TRUE;
break;
case 'dev':
$config['config_split.config_split.dev']['status'] = TRUE;
break;
case 'stage':
$config['config_split.config_split.stage']['status'] = TRUE;
break;
case 'prod':
$config['config_split.config_split.prod']['status'] = TRUE;
$settings['config_readonly'] = TRUE;
break;
}
$settings['reverse_proxy'] = TRUE;
$settings['reverse_proxy_addresses'] = array(@$_SERVER['REMOTE_ADDR']);
/**
* SMTP
*/
$settings['smtp.smtp_on'] = getenv('SMTP_ON');
$settings['smtp.smtp_host'] = getenv('SMTP_HOST');
$settings['smtp.smtp_port'] = getenv('SMTP_PORT');
$settings['smtp.smtp_username'] = getenv('SMTP_USERNAME');
$settings['smtp.smtp_password'] = getenv('SMTP_PASSWORD');
/**
* Include a custom settings file if it exists.
*/
$custom_settings = DRUPAL_ROOT . '/sites/default/custom.settings.php';
if (file_exists($custom_settings)) {
include $custom_settings;
}
$local_settings = DRUPAL_ROOT . '/sites/default/settings.local.php';
if (file_exists($local_settings)) {
include $local_settings;
}
// Automatically generated include for settings managed by ddev.
if (getenv('IS_DDEV_PROJECT') == 'true' && file_exists(__DIR__ . '/settings.ddev.php')) {
include __DIR__ . '/settings.ddev.php';
}