default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5
  template: template0

development:
  <<: *default
  database: publishing_api_development

test:
  <<: *default
  database: publishing_api_test

production:
  <<: *default
  database: publishing_api_production
  username: publishing_api
  password: <%= ENV['DATABASE_PASSWORD'] %>

default: &default
  adapter: postgresql
  encoding: unicode
  pool: 5
  template: template0

development:
  <<: *default
  database: publishing_api_development

test:
  <<: *default
  database: publishing_api_test

production:
  <<: *default
  # Rails reads values from DATABASE_URL env var.

Read db config from DATABASE_URL in production
Read db config from DATABASE_URL in production

Rails 4.2+ does this by default, so it makes sense to use it.

http://guides.rubyonrails.org/configuring.html#configuring-a-database
