Created
January 14, 2014 16:04
-
-
Save brunocruzcoelho/8420719 to your computer and use it in GitHub Desktop.
mongoid config to connect to mongohq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if EY::Config.get(:mongohq, 'MONGOHQ_URL') %> | |
<% uri = URI.parse(EY::Config.get(:mongohq, 'MONGOHQ_URL')) %> | |
staging: | |
sessions: | |
default: | |
database: <%= uri.path.sub('/','') %> | |
username: <%= uri.user %> | |
password: <%= uri.password %> | |
hosts: | |
- <%= uri.host %>:<%= uri.port %> | |
options: | |
read: primary | |
production: | |
sessions: | |
default: | |
database: <%= uri.path.sub('/','') %> | |
username: <%= uri.user %> | |
password: <%= uri.password %> | |
hosts: | |
- <%= uri.host %>:<%= uri.port %> | |
options: | |
read: primary | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment