Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defaults: &defaults
- persist_in_safe_mode: true
- development:
- host: localhost
- database: <development database name>
- autocreate_indexes: true
- <<: *defaults
- test:
- host: localhost
- database: <test database name>
- autocreate_indexes: true
- <<: *defaults
- # set these environment variables on your prod server
- production:
- <%
- hosts = ENV['MONGO_HOSTS']
- unless hosts.nil? || hosts.length == 0
- %>
- hosts:
- <% hosts.split(',').map{|h| h = h.split(':'); h << 27017 unless h.length > 1;h }.each do |h| %>
- - - <%= h.first %>
- - <%= h.last %>
- <% end %>
- <% end %>
- username: <%= ENV['MONGO_USERNAME'] %>
- password: <%= ENV['MONGO_PASSWORD'] %>
- database: <%= ENV['MONGO_DATABASE'] %>
- max_retries_on_connection_failure: 30
- <<: *defaults
Add Comment
Please, Sign In to add comment