default: &default
  adapter: postgresql
  encoding: unicode
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %>
  port: <%= ENV.fetch("DB_PORT") { "5432" } %>
  user: <%= ENV.fetch("POSTGRES_USER") { nil } %>
  password: <%= ENV.fetch("POSTGRES_PASSWORD") { nil } %>

development:
  <<: *default
  database: <%= ENV.fetch("POSTGRES_DB") { "maybe_development" } %>

test:
  <<: *default
  database: <%= ENV.fetch("POSTGRES_DB") { "maybe_test" } %>

production:
  <<: *default
  database: <%= ENV.fetch("POSTGRES_DB") { "maybe_production" } %>
