51 lines
1.8 KiB
PHP
51 lines
1.8 KiB
PHP
<?php
|
|
|
|
$host = "db";
|
|
$port = 3306;
|
|
$driver = "mysql";
|
|
|
|
// If DDEV_PHP_VERSION is not set but IS_DDEV_PROJECT *is*, it means we're running (drush) on the host,
|
|
// so use the host-side bind port on docker IP
|
|
if (empty(getenv('DDEV_PHP_VERSION') && getenv('IS_DDEV_PROJECT') == 'true')) {
|
|
$host = "127.0.0.1";
|
|
$port = 32786;
|
|
}
|
|
|
|
$databases['default']['default'] = array(
|
|
'database' => "db",
|
|
'username' => "db",
|
|
'password' => "db",
|
|
'host' => $host,
|
|
'driver' => $driver,
|
|
'port' => $port,
|
|
'prefix' => "",
|
|
);
|
|
|
|
$settings['hash_salt'] = 'kShGqBypYstnMBJYmaRocqYLQcvBTMgvGbLQkdODVMavjRUyDhgBFcSAideqnFoM';
|
|
|
|
// This will prevent Drupal from setting read-only permissions on sites/default.
|
|
$settings['skip_permissions_hardening'] = TRUE;
|
|
|
|
// This will ensure the site can only be accessed through the intended host
|
|
// names. Additional host patterns can be added for custom configurations.
|
|
$settings['trusted_host_patterns'] = ['.*'];
|
|
|
|
// Don't use Symfony's APCLoader. ddev includes APCu; Composer's APCu loader has
|
|
// better performance.
|
|
$settings['class_loader_auto_detect'] = FALSE;
|
|
|
|
// Set $settings['config_sync_directory'] if not set in settings.php.
|
|
if (empty($settings['config_sync_directory'])) {
|
|
$settings['config_sync_directory'] = 'sites/default/files/sync';
|
|
}
|
|
|
|
// Override drupal/symfony_mailer default config to use Mailhog
|
|
$config['symfony_mailer.mailer_transport.sendmail']['plugin'] = 'smtp';
|
|
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['user']='';
|
|
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['pass']='';
|
|
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['host']='localhost';
|
|
$config['symfony_mailer.mailer_transport.sendmail']['configuration']['port']='1025';
|
|
|
|
// Deveopment services (for CORS)
|
|
$settings['container_yamls'][] = DRUPAL_ROOT . '/sites/development.services.yml';
|