Skip to content

Commit

Permalink
[1.x] Use different DB user for Sail (#75)
Browse files Browse the repository at this point in the history
* Use different DB user for MySQL

* Update InstallCommand.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
driesvints and taylorotwell authored Mar 19, 2021
1 parent 66b2618 commit 2b53c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ protected function replaceEnvVariables(array $services)
$environment = str_replace('DB_PORT=3306', "DB_PORT=5432", $environment);
} else {
$environment = str_replace('DB_HOST=127.0.0.1', "DB_HOST=mysql", $environment);
$environment = str_replace('DB_USERNAME=root', "DB_USERNAME=sail", $environment);
$environment = str_replace('DB_PASSWORD=', "DB_PASSWORD=password", $environment);
}

$environment = str_replace('MEMCACHED_HOST=127.0.0.1', 'MEMCACHED_HOST=memcached', $environment);
$environment = str_replace('REDIS_HOST=127.0.0.1', 'REDIS_HOST=redis', $environment);

Expand Down

0 comments on commit 2b53c0f

Please sign in to comment.