Last active
March 25, 2020 19:01
-
-
Save jigarius/326d2268ce8dfbbaed3ae6791c0431ed to your computer and use it in GitHub Desktop.
Drupal 8 development settings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local development services. | |
# | |
# To activate this feature, follow the instructions at the top of the | |
# 'example.settings.local.php' file, which sits next to this file. | |
parameters: | |
http.response.debug_cacheability_headers: true | |
twig.config: | |
auto_reload: true | |
cache: true | |
debug: true | |
services: | |
cache.backend.null: | |
class: Drupal\Core\Cache\NullBackendFactory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Local settings for Lando dev env. | |
* | |
* Make sure you include this at the very bottom of the settings.php or | |
* settings.local.php file so that it can override the settings as required | |
* to make your site work on your lando env. | |
*/ | |
/** | |
* Prepare a LANDO_INFO constant. | |
* | |
* Contains info which you can see using the "lando info" command. Use the | |
* values in this constant to connect to the right Lando services. | |
*/ | |
if (!defined('LANDO_INFO') && isset($_ENV['LANDO_INFO'])) { | |
define('LANDO_INFO', json_decode($_ENV['LANDO_INFO'], TRUE)); | |
} | |
// When using lando. | |
if (defined('LANDO_INFO')) { | |
// One of "internal" or "external". Usually, "internal". | |
define('LANDO_DATABASE', 'internal'); | |
// Databases. | |
$databases['default']['default'] = [ | |
// Since "mariadb" drivers are the same as "mysql", we hard-code "mysql". | |
'driver' => 'mysql', | |
'database' => LANDO_INFO['database']['creds']['database'], | |
'username' => LANDO_INFO['database']['creds']['user'], | |
'password' => LANDO_INFO['database']['creds']['password'], | |
'host' => LANDO_INFO['database'][LANDO_DATABASE . '_connection']['host'], | |
'port' => LANDO_INFO['database'][LANDO_DATABASE . '_connection']['port'], | |
'prefix' => '', | |
'collation' => 'utf8mb4_general_ci', | |
]; | |
var_dump($databases); | |
} | |
// Trusted host patterns. | |
$settings['trusted_host_patterns'][] = '^.*\.lndo\.site$'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Local development settings. | |
*/ | |
// Enable PHP error display. | |
ini_set('display_errors', 'on'); | |
ini_set('error_display', E_ALL); | |
// Enable Drupal error logging. | |
$config['system.logging']['error_level'] = 'all'; | |
// Trusted host patterns. | |
$settings['trusted_host_patterns'] = [ | |
'^.+$', | |
]; | |
// Include development services. | |
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/default/services.local.yml'; | |
// Allow rebuilding cache by visiting /rebuild.php. | |
$settings['rebuild_access'] = TRUE; | |
// Disable caching. | |
$settings['cache']['bins']['render'] = 'cache.backend.null'; | |
$settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; | |
$settings['cache']['bins']['page'] = 'cache.backend.null'; | |
// Disable CSS / JS aggregation. | |
$config['system.performance']['css']['preprocess'] = FALSE; | |
$config['system.performance']['js']['preprocess'] = FALSE; | |
$config['system.performance']['cache']['page']['max-age'] = 0; | |
// Disable "shield". | |
// Disable shield. | |
$config['shield.settings']['credentials']['shield']['user'] = | |
$config['shield.settings']['credentials']['shield']['pass'] = | |
''; | |
// Stage file proxy. | |
// $config['stage_file_proxy.settings']['origin'] = 'https://example.com'; | |
// Hash salt. | |
// If a hash salt is not configured, you can generate one with: | |
// drush eval 'echo Drupal\Component\Utility\Crypt::randomBytesBase64(55) . "\n";' | |
// $settings['hash_salt'] = 'HASH-SALT-GOES-HERE'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment