Skip to content

Commit

Permalink
Use new MariaDB connection if possible (#672)
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir authored Feb 23, 2024
1 parent 98cbae2 commit f84e444
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Console/Concerns/InteractsWithDockerComposeServices.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ protected function replaceEnvVariables(array $services)
$environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=pgsql", $environment);
$environment = str_replace('DB_PORT=3306', "DB_PORT=5432", $environment);
} elseif (in_array('mariadb', $services)) {
if ($this->laravel->config->has('database.connections.mariadb')) {
$environment = preg_replace('/DB_CONNECTION=.*/', 'DB_CONNECTION=mariadb', $environment);
}

$environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mariadb", $environment);
}

Expand Down

0 comments on commit f84e444

Please sign in to comment.