
development:
  adapter: postgresql
  encoding: unicode
  database: parliamentary-questions_dev
  host: localhost
  pool: 10



test: &test
  adapter: postgresql
  encoding: unicode
  database: parliamentary-questions_test
  host: localhost
  pool: 10

production:
  adapter: postgresql
  host: <%= ENV['DB_HOST'] || 'localhost' %>
  encoding: unicode
  username: <%= ENV['DB_USERNAME'] %>
  password: <%= ENV['DB_PASSWORD'] %>
  database: <%= ENV['DB_NAME'] || 'parliamentary-questions' %>
  pool: 15

cucumber:
  <<: *test


development:
  adapter: postgresql
  encoding: unicode
  database: parliamentary-questions_dev
  username: <%= ENV['DB_USERNAME'] || ENV['PGUSER'] || 'postgres' %>
  password: <%= ENV['DB_PASSWORD'] || ENV['PGPASSWORD'] || 'postgres' %>
  host: <%= ENV['DB_HOST'] || 'localhost' %>
  pool: 10



test: &test
  adapter: postgresql
  encoding: unicode
  database: parliamentary-questions_test
  host: <%= ENV['DB_HOST'] || 'localhost' %>
  pool: 10

production:
  adapter: postgresql
  host: <%= ENV['DB_HOST'] || 'localhost' %>
  encoding: unicode
  username: <%= ENV['DB_USERNAME'] %>
  password: <%= ENV['DB_PASSWORD'] %>
  database: <%= ENV['DB_NAME'] || 'parliamentary-questions' %>
  pool: 15

cucumber:
  <<: *test

Allow further customisation of db through env
Allow further customisation of db through env

Adds more variables to database.yml and logic to allow
different levels of  overrides and customisation as needed
for the new stack and docker-compose.
