mysociety/alaveteli

View on GitHub
config/database.yml-example

Summary

Maintainability
Test Coverage
# Database configuration. We're using PostgreSQL, but I guess it should work
# with others.
#
# Can also connect using the DATABASE_URL environment variable. For example, our
# development Docker enviromement sets the adapter, host, username and password
# using this variable to override the relevant settings below.
#
default: &default
  adapter: postgresql
  template: template_utf8
  host: localhost
  port: 5432
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

development:
  <<: *default
  database: alaveteli_development
  username: <username>
  password: <password>

# Warning: The database defined as 'test' will be erased and
# re-generated from your development database when you run 'rake'.
# Do not set this db to the same as development or production.
test:
  <<: *default
  database: alaveteli_test
  username: <username>
  password: <password>
# Uncomment the following if the user is not a postgres superuser
# constraint_disabling: false

production:
  <<: *default
  database: alaveteli_production
  username: <username>
  password: <password>