default: &default

adapter: postgresql
encoding: utf8
database: <%%= ENV.fetch('DATABASE_NAME', '<%= daemon_name %>_development') %>

username: <%%= ENV.fetch('DATABASE_USERNAME', 'username') %>
password: <%%= ENV.fetch('DATABASE_PASSWORD', 'password') %>

host: <%%= ENV.fetch('DATABASE_HOST', 'localhost') %>
port: <%%= ENV.fetch('DATABASE_PORT', 5432) %>

# Google Cloud PubSub Client defaults to 12 threads for a single subscription:
# 4 streams * (2 callback threads + 1 push threads).
# You should add another 12 to the pool when you make a new subscription.
pool: 12
reconnect: true

development:

<<: *default

test:

<<: *default
database: <%= daemon_name %>_test

staging:

<<: *default

production:

<<: *default