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:
Jon-Michael Deldin 2017-06-20 13:55:06 -07:00 committed by Misty Stanley-Jones
parent 099178a832
commit 8cd94d3873
1 changed files with 8 additions and 4 deletions

View File

@ -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