default: &default
adapter: postgresql
encoding: unicode
# For details on connection pooling, see Rails configuration guide
# https://guides.rubyonrails.org/configuring.html#database-pooling
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
<% if ENV["DB_HOST"] %>
host: <%= ENV["DB_HOST"] %>
username: postgres
password: postgres
<% end %>
...
production:
primary: &primary_production
<<: *default
database: example_production
username: example
host: 192.168.1.117
password: <%= Rails.application.credentials.dig(:postgres, :password) %>
cache:
<<: *primary_production
database: example_production_cache
migrations_paths: db/cache_migrate
queue:
<<: *primary_production
database: example_production_queue
migrations_paths: db/queue_migrate
cable:
<<: *primary_production
database: example_production_cable
migrations_paths: db/cable_migrate