Skip to content

Commit

Permalink
Merge pull request #4 from b13/db-host-config
Browse files Browse the repository at this point in the history
[TASK] Allow db host config
  • Loading branch information
bmack committed Nov 25, 2021
2 parents b7b5500 + 636a576 commit 963d4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Config.php
Expand Up @@ -203,14 +203,14 @@ public function useDevelopmentPreset(): self
return $this;
}

public function useDDEVConfiguration(): self
public function useDDEVConfiguration(string $dbHost = null): self
{
$GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*.*';
$this
->initializeDatabaseConnection(
[
'dbname' => 'db',
'host' => 'db',
'host' => $dbHost ?? ('ddev-' . getenv('DDEV_PROJECT') . '-db'),
'password' => 'db',
'port' => '3306',
'user' => 'db',
Expand Down

0 comments on commit 963d4c7

Please sign in to comment.