Skip to content

Commit

Permalink
[1.x] Database default user name and password (#84)
Browse files Browse the repository at this point in the history
* Database default user name and password

* Update InstallCommand.php

Co-authored-by: Dries Vints <dries@vints.io>
  • Loading branch information
liweijie0812 and driesvints authored Mar 29, 2021
1 parent 935b453 commit c0d871a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,11 @@ 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('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 c0d871a

Please sign in to comment.