From f32fae3065bb12b9f22e7e30d17a6c00ac9d0dd0 Mon Sep 17 00:00:00 2001 From: Daniel Date: Tue, 14 Nov 2017 05:00:18 -0600 Subject: [PATCH] separate database.yml configs files for each scenario --- config/database-docker.yml.example | 28 ++++++++++++++++++++++++++++ config/database.yml.example | 8 +++----- 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 config/database-docker.yml.example diff --git a/config/database-docker.yml.example b/config/database-docker.yml.example new file mode 100644 index 000000000..dc1efbd7e --- /dev/null +++ b/config/database-docker.yml.example @@ -0,0 +1,28 @@ +default: &default + adapter: postgresql + encoding: unicode + #host: localhost + host: database #<--the name of the db in the docker-compose + pool: 5 + port: 5432 + username: postgres + password: <%= ENV['POSTGRES_PASSWORD'] %> + +development: &development + <<: *default + database: consul_development + +# The staging, preproduction and production dbs are only needed +# for running rake assets:precompile locally before deploying +staging: + <<: *development + +preproduction: + <<: *development + +production: + <<: *development + +test: + <<: *default + database: consul_test diff --git a/config/database.yml.example b/config/database.yml.example index dc1efbd7e..2f8b7463f 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -1,12 +1,10 @@ default: &default adapter: postgresql encoding: unicode - #host: localhost - host: database #<--the name of the db in the docker-compose + host: localhost pool: 5 - port: 5432 - username: postgres - password: <%= ENV['POSTGRES_PASSWORD'] %> + username: + password: development: &development <<: *default