Last active
September 28, 2019 14:34
-
-
Save jordotech/f0c7726bc6212881287ae1872bf3c313 to your computer and use it in GitHub Desktop.
Drupal 8 starter settings.php for https://github.com/jordotech/d8-docker
This file contains 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 | |
// @codingStandardsIgnoreFile | |
$databases['default']['default'] = [ | |
'database' => 'drupal', | |
'username' => 'drupal', | |
'password' => 'drupal', | |
'host' => 'db', | |
'port' => '3306', | |
'driver' => 'mysql', | |
'prefix' => '', | |
'collation' => 'utf8mb4_general_ci', | |
]; | |
$config_directories = [CONFIG_SYNC_DIRECTORY => '/var/www/sync',]; | |
$settings['hash_salt'] = '0CAw0AgoGq6EqjYlDKBVA6Gdex0pSAOCMPCTlK7wkk6liHUT_49HoD6vBlO8FIzWWK6ScBa5vg'; | |
# $settings['deployment_identifier'] = \Drupal::VERSION; | |
$settings['update_free_access'] = FALSE; | |
# $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080'; | |
# $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080'; | |
# $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost']; | |
# $settings['reverse_proxy'] = TRUE; | |
# $settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_ALL | \Symfony\Component\HttpFoundation\Request::HEADER_FORWARDED; | |
# $settings['omit_vary_cookie'] = TRUE; | |
# $settings['cache_ttl_4xx'] = 3600; | |
# $settings['form_cache_expiration'] = 21600; | |
# $settings['class_loader_auto_detect'] = FALSE; | |
# $settings['allow_authorize_operations'] = FALSE; | |
# $settings['file_chmod_directory'] = 0775; | |
# $settings['file_chmod_file'] = 0664; | |
/** | |
* Public file base URL: | |
* | |
* An alternative base URL to be used for serving public files. This must | |
* include any leading directory path. | |
* | |
* A different value from the domain used by Drupal to be used for accessing | |
* public files. This can be used for a simple CDN integration, or to improve | |
* security by serving user-uploaded files from a different domain or subdomain | |
* pointing to the same server. Do not include a trailing slash. | |
*/ | |
# $settings['file_public_base_url'] = 'http://downloads.example.com/files'; | |
/** | |
* Public file path: | |
* | |
* A local file system path where public files will be stored. This directory | |
* must exist and be writable by Drupal. This directory must be relative to | |
* the Drupal installation directory and be accessible over the web. | |
*/ | |
# $settings['file_public_path'] = 'sites/default/files'; | |
/** | |
* Private file path: | |
* | |
* A local file system path where private files will be stored. This directory | |
* must be absolute, outside of the Drupal installation directory and not | |
* accessible over the web. | |
* | |
* Note: Caches need to be cleared when this value is changed to make the | |
* private:// stream wrapper available to the system. | |
* | |
* See https://www.drupal.org/documentation/modules/file for more information | |
* about securing private files. | |
*/ | |
# $settings['file_private_path'] = ''; | |
/** | |
* Session write interval: | |
* | |
* Set the minimum interval between each session write to database. | |
* For performance reasons it defaults to 180. | |
*/ | |
# $settings['session_write_interval'] = 180; | |
/** | |
* String overrides: | |
* | |
* To override specific strings on your site with or without enabling the Locale | |
* module, add an entry to this list. This functionality allows you to change | |
* a small number of your site's default English language interface strings. | |
* | |
* Remove the leading hash signs to enable. | |
* | |
* The "en" part of the variable name, is dynamic and can be any langcode of | |
* any added language. (eg locale_custom_strings_de for german). | |
*/ | |
# $settings['locale_custom_strings_en'][''] = [ | |
# 'forum' => 'Discussion board', | |
# '@count min' => '@count minutes', | |
# ]; | |
/** | |
* A custom theme for the offline page: | |
* | |
* This applies when the site is explicitly set to maintenance mode through the | |
* administration page or when the database is inactive due to an error. | |
* The template file should also be copied into the theme. It is located inside | |
* 'core/modules/system/templates/maintenance-page.html.twig'. | |
* | |
* Note: This setting does not apply to installation and update pages. | |
*/ | |
# $settings['maintenance_theme'] = 'bartik'; | |
/** | |
* PHP settings: | |
* | |
* To see what PHP settings are possible, including whether they can be set at | |
* runtime (by using ini_set()), read the PHP documentation: | |
* http://php.net/manual/ini.list.php | |
* See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime | |
* settings and the .htaccess file for non-runtime settings. | |
* Settings defined there should not be duplicated here so as to avoid conflict | |
* issues. | |
*/ | |
/** | |
* If you encounter a situation where users post a large amount of text, and | |
* the result is stripped out upon viewing but can still be edited, Drupal's | |
* output filter may not have sufficient memory to process it. If you | |
* experience this issue, you may wish to uncomment the following two lines | |
* and increase the limits of these variables. For more information, see | |
* http://php.net/manual/pcre.configuration.php. | |
*/ | |
# ini_set('pcre.backtrack_limit', 200000); | |
# ini_set('pcre.recursion_limit', 200000); | |
/** | |
* Active configuration settings. | |
* | |
* By default, the active configuration is stored in the database in the | |
* {config} table. To use a different storage mechanism for the active | |
* configuration, do the following prior to installing: | |
* - Create an "active" directory and declare its path in $config_directories | |
* as explained under the 'Location of the site configuration files' section | |
* above in this file. To enhance security, you can declare a path that is | |
* outside your document root. | |
* - Override the 'bootstrap_config_storage' setting here. It must be set to a | |
* callable that returns an object that implements | |
* \Drupal\Core\Config\StorageInterface. | |
* - Override the service definition 'config.storage.active'. Put this | |
* override in a services.yml file in the same directory as settings.php | |
* (definitions in this file will override service definition defaults). | |
*/ | |
# $settings['bootstrap_config_storage'] = ['Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage']; | |
/** | |
* Configuration overrides. | |
* | |
* To globally override specific configuration values for this site, | |
* set them here. You usually don't need to use this feature. This is | |
* useful in a configuration file for a vhost or directory, rather than | |
* the default settings.php. | |
* | |
* Note that any values you provide in these variable overrides will not be | |
* viewable from the Drupal administration interface. The administration | |
* interface displays the values stored in configuration so that you can stage | |
* changes to other environments that don't have the overrides. | |
* | |
* There are particular configuration values that are risky to override. For | |
* example, overriding the list of installed modules in 'core.extension' is not | |
* supported as module install or uninstall has not occurred. Other examples | |
* include field storage configuration, because it has effects on database | |
* structure, and 'core.menu.static_menu_link_overrides' since this is cached in | |
* a way that is not config override aware. Also, note that changing | |
* configuration values in settings.php will not fire any of the configuration | |
* change events. | |
*/ | |
# $config['system.file']['path']['temporary'] = '/tmp'; | |
# $config['system.site']['name'] = 'My Drupal site'; | |
# $config['system.theme']['default'] = 'stark'; | |
# $config['user.settings']['anonymous'] = 'Visitor'; | |
/** | |
* Fast 404 pages: | |
* | |
* Drupal can generate fully themed 404 pages. However, some of these responses | |
* are for images or other resource files that are not displayed to the user. | |
* This can waste bandwidth, and also generate server load. | |
* | |
* The options below return a simple, fast 404 page for URLs matching a | |
* specific pattern: | |
* - $config['system.performance']['fast_404']['exclude_paths']: A regular | |
* expression to match paths to exclude, such as images generated by image | |
* styles, or dynamically-resized images. The default pattern provided below | |
* also excludes the private file system. If you need to add more paths, you | |
* can add '|path' to the expression. | |
* - $config['system.performance']['fast_404']['paths']: A regular expression to | |
* match paths that should return a simple 404 page, rather than the fully | |
* themed 404 page. If you don't have any aliases ending in htm or html you | |
* can add '|s?html?' to the expression. | |
* - $config['system.performance']['fast_404']['html']: The html to return for | |
* simple 404 pages. | |
* | |
* Remove the leading hash signs if you would like to alter this functionality. | |
*/ | |
# $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//'; | |
# $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i'; | |
# $config['system.performance']['fast_404']['html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>'; | |
/** | |
* Load services definition file. | |
*/ | |
$settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml'; | |
/** | |
* Override the default service container class. | |
* | |
* This is useful for example to trace the service container for performance | |
* tracking purposes, for testing a service container with an error condition or | |
* to test a service container that throws an exception. | |
*/ | |
# $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container'; | |
# $settings['yaml_parser_class'] = NULL; | |
$settings['file_scan_ignore_directories'] = [ | |
'node_modules', | |
'bower_components', | |
]; | |
$settings['entity_update_batch_size'] = 50; | |
/** | |
* Entity update backup. | |
* | |
* This is used to inform the entity storage handler that the backup tables as | |
* well as the original entity type and field storage definitions should be | |
* retained after a successful entity update process. | |
*/ | |
$settings['entity_update_backup'] = TRUE; | |
/** | |
* Load local development override configuration, if available. | |
* | |
* Use settings.local.php to override variables on secondary (staging, | |
* development, etc) installations of this site. Typically used to disable | |
* caching, JavaScript/CSS compression, re-routing of outgoing emails, and | |
* other things that should not happen on development and testing sites. | |
* | |
* Keep this code block at the end of this file to take full effect. | |
*/ | |
# | |
# if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { | |
# include $app_root . '/' . $site_path . '/settings.local.php'; | |
# } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment