Skip to content

Commit

Permalink
Use DSN for db connections
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed May 26, 2020
1 parent 7806f55 commit b82e25a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cms/config/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
*/

return [
'driver' => getenv('DB_DRIVER'),
'server' => getenv('DB_SERVER'),
'dsn' => getenv('DB_DSN'),
'user' => getenv('DB_USER'),
'password' => getenv('DB_PASSWORD'),
'database' => getenv('DB_DATABASE'),
'schema' => getenv('DB_SCHEMA'),
'tablePrefix' => getenv('DB_TABLE_PREFIX'),
'port' => getenv('DB_PORT')
];
5 changes: 1 addition & 4 deletions cms/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ RUN_QUEUE_AUTOMATICALLY=1
SECURITY_KEY=EOdiVBONceb8zFGJP7InMui2pMkvNACz

# Craft database settings
DB_DRIVER=mysql
DB_SERVER=mariadb
DB_DSN=mysql:host=mariadb;port=3306;dbname=project
DB_USER=project
DB_PASSWORD=project
DB_DATABASE=project
DB_SCHEMA=public
DB_TABLE_PREFIX=
DB_PORT=

# URL & path settings
ASSETS_URL=http://localhost:8000
Expand Down

0 comments on commit b82e25a

Please sign in to comment.