|
| 1 | +<?php |
| 2 | + |
| 3 | +// @codingStandardsIgnoreFile |
| 4 | + |
| 5 | +/** |
| 6 | + * @file |
| 7 | + * Local development override configuration feature. This file is intended for |
| 8 | + * use under EvolvingWeb's docker deployments. If deployed elsewhere ignore this. |
| 9 | + * |
| 10 | + * To activate this feature, copy and rename it such that its path plus |
| 11 | + * filename is 'sites/default/settings.local.php'. Then, go to the bottom of |
| 12 | + * 'sites/default/settings.php' and uncomment the commented lines that mention |
| 13 | + * 'settings.local.php'. |
| 14 | + * |
| 15 | + * If you are using a site name in the path, such as 'sites/example.com', copy |
| 16 | + * this file to 'sites/example.com/settings.local.php', and uncomment the lines |
| 17 | + * at the bottom of 'sites/example.com/settings.php'. |
| 18 | + */ |
| 19 | + |
| 20 | +/** |
| 21 | + * Assertions. |
| 22 | + * |
| 23 | + * The Drupal project primarily uses runtime assertions to enforce the |
| 24 | + * expectations of the API by failing when incorrect calls are made by code |
| 25 | + * under development. |
| 26 | + * |
| 27 | + * @see http://php.net/assert |
| 28 | + * @see https://www.drupal.org/node/2492225 |
| 29 | + * |
| 30 | + * If you are using PHP 7.0 it is strongly recommended that you set |
| 31 | + * zend.assertions=1 in the PHP.ini file (It cannot be changed from .htaccess |
| 32 | + * or runtime) on development machines and to 0 in production. |
| 33 | + * |
| 34 | + * @see https://wiki.php.net/rfc/expectations |
| 35 | + */ |
| 36 | +assert_options(ASSERT_ACTIVE, TRUE); |
| 37 | +\Drupal\Component\Assertion\Handle::register(); |
| 38 | + |
| 39 | +/** |
| 40 | + * Enable local development services. |
| 41 | + */ |
| 42 | +$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml'; |
| 43 | + |
| 44 | +/** |
| 45 | + * Show all error messages, with backtrace information. |
| 46 | + * |
| 47 | + * In case the error level could not be fetched from the database, as for |
| 48 | + * example the database connection failed, we rely only on this value. |
| 49 | + */ |
| 50 | +$config['system.logging']['error_level'] = 'verbose'; |
| 51 | + |
| 52 | +/** |
| 53 | + * Disable CSS and JS aggregation. |
| 54 | + */ |
| 55 | +$config['system.performance']['css']['preprocess'] = FALSE; |
| 56 | +$config['system.performance']['js']['preprocess'] = FALSE; |
| 57 | + |
| 58 | +/** |
| 59 | + * Disable the render cache. |
| 60 | + * |
| 61 | + * Note: you should test with the render cache enabled, to ensure the correct |
| 62 | + * cacheability metadata is present. However, in the early stages of |
| 63 | + * development, you may want to disable it. |
| 64 | + * |
| 65 | + * This setting disables the render cache by using the Null cache back-end |
| 66 | + * defined by the development.services.yml file above. |
| 67 | + * |
| 68 | + * Only use this setting once the site has been installed. |
| 69 | + */ |
| 70 | +# $settings['cache']['bins']['render'] = 'cache.backend.null'; |
| 71 | + |
| 72 | +/** |
| 73 | + * Disable caching for migrations. |
| 74 | + * |
| 75 | + * Uncomment the code below to only store migrations in memory and not in the |
| 76 | + * database. This makes it easier to develop custom migrations. |
| 77 | + */ |
| 78 | +# $settings['cache']['bins']['discovery_migration'] = 'cache.backend.memory'; |
| 79 | + |
| 80 | +/** |
| 81 | + * Disable Internal Page Cache. |
| 82 | + * |
| 83 | + * Note: you should test with Internal Page Cache enabled, to ensure the correct |
| 84 | + * cacheability metadata is present. However, in the early stages of |
| 85 | + * development, you may want to disable it. |
| 86 | + * |
| 87 | + * This setting disables the page cache by using the Null cache back-end |
| 88 | + * defined by the development.services.yml file above. |
| 89 | + * |
| 90 | + * Only use this setting once the site has been installed. |
| 91 | + */ |
| 92 | +# $settings['cache']['bins']['page'] = 'cache.backend.null'; |
| 93 | + |
| 94 | +/** |
| 95 | + * Disable Dynamic Page Cache. |
| 96 | + * |
| 97 | + * Note: you should test with Dynamic Page Cache enabled, to ensure the correct |
| 98 | + * cacheability metadata is present (and hence the expected behavior). However, |
| 99 | + * in the early stages of development, you may want to disable it. |
| 100 | + */ |
| 101 | +# $settings['cache']['bins']['dynamic_page_cache'] = 'cache.backend.null'; |
| 102 | + |
| 103 | +/** |
| 104 | + * Allow test modules and themes to be installed. |
| 105 | + * |
| 106 | + * Drupal ignores test modules and themes by default for performance reasons. |
| 107 | + * During development it can be useful to install test extensions for debugging |
| 108 | + * purposes. |
| 109 | + */ |
| 110 | +# $settings['extension_discovery_scan_tests'] = TRUE; |
| 111 | + |
| 112 | +/** |
| 113 | + * Enable access to rebuild.php. |
| 114 | + * |
| 115 | + * This setting can be enabled to allow Drupal's php and database cached |
| 116 | + * storage to be cleared via the rebuild.php page. Access to this page can also |
| 117 | + * be gained by generating a query string from rebuild_token_calculator.sh and |
| 118 | + * using these parameters in a request to rebuild.php. |
| 119 | + */ |
| 120 | +$settings['rebuild_access'] = TRUE; |
| 121 | + |
| 122 | +/** |
| 123 | + * Skip file system permissions hardening. |
| 124 | + * |
| 125 | + * The system module will periodically check the permissions of your site's |
| 126 | + * site directory to ensure that it is not writable by the website user. For |
| 127 | + * sites that are managed with a version control system, this can cause problems |
| 128 | + * when files in that directory such as settings.php are updated, because the |
| 129 | + * user pulling in the changes won't have permissions to modify files in the |
| 130 | + * directory. |
| 131 | + */ |
| 132 | +$settings['skip_permissions_hardening'] = TRUE; |
| 133 | + |
| 134 | +/** |
| 135 | + * Database settings: |
| 136 | + */ |
| 137 | +$databases['default']['default'] = array( |
| 138 | + 'driver' => 'mysql', |
| 139 | + 'database' => !isset($_ENV['MYSQL_DATABASE']) ? 'drupal' : $_ENV['MYSQL_DATABASE'], |
| 140 | + 'username' => !isset($_ENV['MYSQL_USER']) ? 'drupal' : $_ENV['MYSQL_USER'], |
| 141 | + 'password' => !isset($_ENV['MYSQL_PASSWORD']) ? 'drupal' : $_ENV['MYSQL_PASSWORD'], |
| 142 | + 'host' => 'db', |
| 143 | + 'prefix' => '', |
| 144 | +); |
| 145 | + |
| 146 | +/** |
| 147 | + * Trusted host configuration. |
| 148 | + */ |
| 149 | +$settings["trusted_host_patterns"] = array( |
| 150 | + '^localhost$', |
| 151 | +); |
0 commit comments