production: <<: *default url: postgresql-makara:/// makara: sticky: true connections: - role: master name: primary url: <%= ENV["DATABASE_URL"] %> - name: replica url: <%= ENV["ANALYTICS_URL"] %>
default: &default adapter: postgresql encoding: unicode development: primary: <<: *default database: hot_seller_development follower: <<: *default database: hot_seller_development replica: true production: primary: <<: *default url: <%= ENV['DATABASE_URL'] %> follower: <<: *default url: <%= ENV['ANALYTICS_URL'] %> replica: true
ActiveRecord::Base.establish_connection(Rails.application.credentials.fetch :DATABASE_URL)