Add the configuration of the d7 database
This commit is contained in:
parent
0dd672bed1
commit
c3696b4b96
1 changed files with 24 additions and 0 deletions
|
@ -4,3 +4,27 @@
|
|||
if (file_exists($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';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue