Add the configuration of the d7 database

This commit is contained in:
David Valdez 2019-07-18 15:16:29 -05:00
parent 0dd672bed1
commit c3696b4b96

View file

@ -4,3 +4,27 @@
if (file_exists($app_root . '/' . $site_path . '/settings.ddev.php')) { if (file_exists($app_root . '/' . $site_path . '/settings.ddev.php')) {
include $app_root . '/' . $site_path . '/settings.ddev.php'; include $app_root . '/' . $site_path . '/settings.ddev.php';
} }
$host = "db";
$port = 3306;
// If DDEV_PHP_VERSION is not set, it means we're running on the host,
// so use the host-side bind port on docker IP
if (empty(getenv('DDEV_PHP_VERSION'))) {
$host = "127.0.0.1";
$port = 32768;
}
$databases['drupal7']['default'] = [
'database' => "drupal7",
'username' => "db",
'password' => "db",
'host' => $host,
'driver' => "mysql",
'port' => $port,
'prefix' => "",
];
// This specifies the default configuration sync directory.
if (empty($config_directories[CONFIG_SYNC_DIRECTORY])) {
$config_directories[CONFIG_SYNC_DIRECTORY] = '../sync';
}