mirror of https://github.com/docker/docs.git
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:
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:
|
Replace the contents of `config/database.yml` with the following:
|
||||||
|
|
||||||
```none
|
```none
|
||||||
development: &default
|
default: &default
|
||||||
adapter: postgresql
|
adapter: postgresql
|
||||||
encoding: unicode
|
encoding: unicode
|
||||||
database: myapp_development
|
host: db
|
||||||
pool: 5
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password:
|
password:
|
||||||
host: db
|
pool: 5
|
||||||
|
|
||||||
|
development:
|
||||||
|
<<: *default
|
||||||
|
database: myapp_development
|
||||||
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
<<: *default
|
<<: *default
|
||||||
|
|
Loading…
Reference in New Issue