Skip to content

Instantly share code, notes, and snippets.

@arjan0307
Created May 4, 2017 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arjan0307/e1a2a810604b5ba8fdf49782f60e5363 to your computer and use it in GitHub Desktop.
Save arjan0307/e1a2a810604b5ba8fdf49782f60e5363 to your computer and use it in GitHub Desktop.
Makara on heroku
export MASTER_URL=$DATABASE_URL
development:
url: <%= ENV['DATABASE_URL'] %>
test:
url: <%= ENV['TEST_DATABASE_URL'] %>
production:
url: <%= ENV.fetch('MASTER_URL', '').sub(/^postgres/, "postgresql-makara") %>
makara:
connections:
- role: master
# MASTER_URL is set in .profile, makara doesn't like it when you use DATABASE_URL here directly
url: <%= ENV['MASTER_URL'] %>
<% if ENV['SLAVE_URL'].present? %>
- role: slave
url: <%= ENV['SLAVE_URL'] %>
<% end %>
@jo-tilkee
Copy link

HI! I try to do exaclty the same thing, but it does not work for me :(
Can you tell me your ruby version please.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment