Skip to content

Commit 2bc60cd

Browse files
committed
Settings.php for Lando out of the box.
1 parent 1f984e0 commit 2bc60cd

2 files changed

Lines changed: 111 additions & 8 deletions

File tree

docroot/sites/default/settings/includes.settings.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,6 @@
101101
$config['shield.settings']['print'] = 'Check out https://github.com/Drupalcz/drupalcz ;-)';
102102
}
103103

104-
105-
// Custom Travis CI settings.
106-
$travis_settings = DRUPAL_ROOT . "/sites/default/settings/travis.settings.php";
107-
if (getenv('TRAVIS') && file_exists($travis_settings)) {
108-
require $travis_settings;
109-
}
110-
111104
/**
112105
* Acquia - custom environment settings.
113106
*/
@@ -129,4 +122,21 @@
129122
require $path;
130123
}
131124

132-
require_once DRUPAL_ROOT . "/sites/default/settings/local.settings.php";
125+
/**
126+
* Lando environment settings.
127+
*/
128+
if (isset($_ENV["LANDO_APP_NAME"])) {
129+
$path = DRUPAL_ROOT . "/sites/default/settings/lando.settings.php";
130+
// Load settings.
131+
if (!empty($path) && file_exists($path)) {
132+
require $path;
133+
}
134+
}
135+
136+
/**
137+
* Allow final local override.
138+
*/
139+
$path = DRUPAL_ROOT . "/sites/default/settings/local.settings.php";
140+
if (!empty($path) && file_exists($path)) {
141+
require $path;
142+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* Local development override configuration feature.
6+
*
7+
* To activate this feature, copy and rename it such that its path plus
8+
* filename is 'sites/SITE/settings.loc.php'.
9+
*/
10+
11+
$loc_db_name = 'drupal9';
12+
$loc_db_user = 'drupal9';
13+
$loc_db_pass = 'drupal9';
14+
$loc_db_host = 'database';
15+
$loc_db_port = '3306';
16+
17+
$databases = [
18+
'default' =>
19+
[
20+
'default' =>
21+
[
22+
'database' => $loc_db_name,
23+
'username' => $loc_db_user,
24+
'password' => $loc_db_pass,
25+
'host' => $loc_db_host,
26+
'port' => $loc_db_port,
27+
'driver' => 'mysql',
28+
'prefix' => '',
29+
],
30+
],
31+
];
32+
33+
/**
34+
* Setup files on local.
35+
*/
36+
$settings['file_public_path'] = "sites/default/files";
37+
$settings['file_private_path'] = "/app/web/sites/default/files/private";
38+
$settings["file_temp_path"] = '/tmp';
39+
40+
/**
41+
* Skip file system permissions hardening on local.
42+
*/
43+
$settings['skip_permissions_hardening'] = TRUE;
44+
45+
/**
46+
* Access control for update.php script.
47+
*/
48+
$settings['update_free_access'] = TRUE;
49+
50+
/**
51+
* Enable local development services.
52+
*/
53+
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
54+
55+
/**
56+
* Disable Drupal caching.
57+
*/
58+
$settings['cache']['bins']['render'] = 'cache.backend.null';
59+
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null';
60+
61+
/**
62+
* Enable access to rebuild.php.
63+
*
64+
* This setting can be enabled to allow Drupal's php and database cached
65+
* storage to be cleared via the rebuild.php page. Access to this page can also
66+
* be gained by generating a query string from rebuild_token_calculator.sh and
67+
* using these parameters in a request to rebuild.php.
68+
*/
69+
$settings['rebuild_access'] = TRUE;
70+
71+
/**
72+
* Salt for one-time login links, cancel links, form tokens, etc.
73+
*/
74+
$settings['hash_salt'] = 'LOCAL_ONLY';
75+
76+
/**
77+
* Simulate config we have available on Acquia.
78+
*
79+
* Get your own keys:
80+
* * Slack token: https://api.slack.com/custom-integrations/legacy-tokens .
81+
*/
82+
$config['slack_invite.settings']['token'] = "DUMMY_TOKEN";
83+
84+
/**
85+
* Set active config split.
86+
*/
87+
$config['config_split.config_split.local']['status'] = TRUE;
88+
$config['config_split.config_split.default_content']['status'] = TRUE;
89+
//$config['config_split.config_split.default_content']['status'] = FALSE;
90+
$config['config_split.config_split.dev']['status'] = FALSE;
91+
$config['config_split.config_split.test']['status'] = FALSE;
92+
$config['config_split.config_split.cleantalk']['status'] = FALSE;
93+
$config['config_split.config_split.prod']['status'] = FALSE;

0 commit comments

Comments
 (0)