Skip to content

Commit

Permalink
Make db.hostname configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverFire committed Sep 30, 2020
1 parent 18d9a8b commit 0f0ce58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/common.php
Expand Up @@ -19,7 +19,7 @@
'components' => [
'db' => [
'class' => \yii\db\Connection::class,
'dsn' => 'mysql:host=localhost;dbname=' . $params['db.name'],
'dsn' => "mysql:host={$params['db.hostname']};dbname={$params['db.name']}",
'username' => $params['db.username'],
'password' => $params['db.password'],
'charset' => 'utf8',
Expand Down
1 change: 1 addition & 0 deletions src/config/params.php
Expand Up @@ -11,6 +11,7 @@
return [
'favicon.ico' => '@hiqdev/assetpackagist/assets/images/favicon.ico',

'db.hostname' => 'localhost',
'db.name' => 'asset_packagist',
'db.username' => 'asset-packagist',
'db.password' => '',
Expand Down

0 comments on commit 0f0ce58

Please sign in to comment.