mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
Fix test DB creation in Compose's database.yml (#3123)
Without the host and credentials, the `myapp_test` database is not created, and instead, the user receives a PG error and a long backtrace. This commit moves the credentials to a default anchor to share across development and test environments.
This commit is contained in:
committed by
Misty Stanley-Jones
parent
099178a832
commit
8cd94d3873
@@ -128,14 +128,18 @@ align with the defaults set by the `postgres` image.
|
||||
Replace the contents of `config/database.yml` with the following:
|
||||
|
||||
```none
|
||||
development: &default
|
||||
default: &default
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
database: myapp_development
|
||||
pool: 5
|
||||
host: db
|
||||
username: postgres
|
||||
password:
|
||||
host: db
|
||||
pool: 5
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: myapp_development
|
||||
|
||||
|
||||
test:
|
||||
<<: *default
|
||||
|
||||
Reference in New Issue
Block a user