|
| 1 | +/** |
| 2 | + * Section appended onto drupal/core default.settings.php via "drupal-scaffold" in composer.json. |
| 3 | + */ |
| 4 | + |
| 5 | +// Let Drush use all the memory available. |
| 6 | +if (PHP_SAPI === 'cli') { |
| 7 | + ini_set('memory_limit', '-1'); |
| 8 | +} |
| 9 | + |
| 10 | +// Required when running Drupal behind a reverse proxy. |
| 11 | +$settings['reverse_proxy'] = TRUE; |
| 12 | +$settings['reverse_proxy_addresses'] = array($_SERVER['REMOTE_ADDR']); |
| 13 | +$settings['reverse_proxy_trusted_headers'] = \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_FOR | |
| 14 | +\Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PROTO | \Symfony\Component\HttpFoundation\Request::HEADER_X_FORWARDED_PORT; |
| 15 | + |
| 16 | +/** |
| 17 | + * Private file path: |
| 18 | + * |
| 19 | + * A local file system path where private files will be stored. This directory |
| 20 | + * must be absolute, outside of the Drupal installation directory and not |
| 21 | + * accessible over the web. |
| 22 | + * |
| 23 | + * Note: Caches need to be cleared when this value is changed to make the |
| 24 | + * private:// stream wrapper available to the system. |
| 25 | + * |
| 26 | + * See https://www.drupal.org/documentation/modules/file for more information |
| 27 | + * about securing private files. |
| 28 | + */ |
| 29 | +$settings['file_private_path'] = '/var/www/drupal/private/'; |
| 30 | + |
| 31 | +// Shared configuration, config_split is used for any site specific differences. |
| 32 | +$settings['config_sync_directory'] = '/var/www/drupal/config/sync'; |
| 33 | + |
| 34 | +// Content sync module. |
| 35 | +global $content_directories; |
| 36 | +$content_directories['sync'] = '/var/www/drupal/content/sync'; |
| 37 | + |
| 38 | +// Container environment variable path. |
| 39 | +$path = "/var/run/s6/container_environment/"; |
| 40 | + |
| 41 | +// Some configurations are derived from environment variables. |
| 42 | +$config['islandora.settings']['broker_url'] = file_get_contents($path . 'DRUPAL_DEFAULT_BROKER_URL'); |
| 43 | +$config['islandora.settings']['broker_user'] = file_exists($path . 'DRUPAL_DEFAULT_BROKER_USER') ? file_get_contents($path . 'DRUPAL_DEFAULT_BROKER_USER') : NULL; |
| 44 | +$config['islandora.settings']['broker_password'] = file_exists($path . 'DRUPAL_DEFAULT_BROKER_PASSWORD') ? file_get_contents($path . 'DRUPAL_DEFAULT_BROKER_PASSWORD') : NULL; |
| 45 | +$config['islandora_iiif.settings']['iiif_server'] = file_get_contents($path . 'DRUPAL_DEFAULT_CANTALOUPE_URL'); |
| 46 | +$config['openseadragon.settings']['iiif_server'] = file_get_contents($path . 'DRUPAL_DEFAULT_CANTALOUPE_URL'); |
| 47 | +$config['search_api.server.default_solr_server']['backend_config']['connector_config']['host'] = file_get_contents($path . 'DRUPAL_DEFAULT_SOLR_HOST'); |
| 48 | +$config['search_api.server.default_solr_server']['backend_config']['connector_config']['port'] = file_get_contents($path . 'DRUPAL_DEFAULT_SOLR_PORT'); |
| 49 | +$config['search_api.server.default_solr_server']['backend_config']['connector_config']['core'] = file_get_contents($path . 'DRUPAL_DEFAULT_SOLR_CORE'); |
| 50 | + |
| 51 | +// Others are hardcoded. |
| 52 | +$config['key.key.islandora_rsa_key']['key_provider_settings']['file_location'] = '/opt/keys/jwt/private.key'; |
| 53 | + |
| 54 | +// Some settings are derived from environment variables. |
| 55 | +$settings['hash_salt'] = file_get_contents($path . 'DRUPAL_DEFAULT_SALT'); |
| 56 | +$settings['trusted_host_patterns'] = [ |
| 57 | + 0 => file_get_contents($path . 'DRUPAL_DEFAULT_SITE_URL'), |
| 58 | +]; |
| 59 | + |
| 60 | +// Database settings are also derived from environment variables. |
| 61 | +$databases['default']['default'] = [ |
| 62 | + 'database' => file_get_contents($path . 'DRUPAL_DEFAULT_DB_NAME'), |
| 63 | + 'username' => file_get_contents($path . 'DRUPAL_DEFAULT_DB_USER'), |
| 64 | + 'password' => file_get_contents($path . 'DRUPAL_DEFAULT_DB_PASSWORD'), |
| 65 | + 'host' => file_get_contents($path . 'DB_MYSQL_HOST'), |
| 66 | + 'port' => file_get_contents($path . 'DB_MYSQL_PORT'), |
| 67 | + 'prefix' => '', |
| 68 | + 'driver' => 'mysql', |
| 69 | + 'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql', |
| 70 | +]; |
| 71 | + |
| 72 | +// Flysystem |
| 73 | +$settings['flysystem']['fedora']['driver'] = 'fedora'; |
| 74 | +$settings['flysystem']['fedora']['config']['root'] = file_get_contents($path . 'DRUPAL_DEFAULT_FCREPO_URL'); |
| 75 | + |
| 76 | +// Change the php_storage settings in your setting.php. It is recommend that |
| 77 | +// this directory be outside out of the docroot. |
| 78 | +$settings['php_storage']['twig']['directory'] = $settings['file_private_path'] . '/php'; |
| 79 | +$settings['php_storage']['twig']['secret'] = $settings['hash_salt']; |
| 80 | + |
| 81 | +/** |
| 82 | + * End Section. |
| 83 | + */ |
0 commit comments