settings.php: Few Ways to Add Changes

Method 1 (env.json) in drupalroot/sites/default/env.json

1{
2  "conf_dir": "/etc/drupal/site_identifier_here/default"
3}

in /etc/drupal/site_identifier_here/default, there is then a file globals.conf.d/globals.default.json with content:

 1{
 2  "id": "default",
 3  "databases": {
 4    "default": {
 5      "default": {
 6        "database": "yourDB",
 7        "username": "yourDBA",
 8        "password": "yourPASS",
 9        "host": "127.0.0.1",
10        "driver": "mysql"
11      }
12    }
13  },
14  "uri": "example.com",
15  "doc_root": "www",
16  "chef_type": "data_bag_item",
17  "data_bag": "drupal"
18}
19
20*Method 2: Referenced from settings.php*
21
22See https://ismael.casimpan.com/quicktasks-drupal/post/settings-php-including-settings-local/
23
24With sample settings.local.php in https://ismael.casimpan.com/quicktasks-drupal/post/settings-php-sample-settings-local/