Created
March 21, 2015 23:37
-
-
Save xymor/2c46fed277a07ea776c4 to your computer and use it in GitHub Desktop.
simple mongoid config to use with mongolab env.vars
This file contains 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
development: | |
# Configure available database sessions. (required) | |
sessions: | |
# Defines the default session. (required) | |
default: | |
# Defines the name of the default database that Mongoid can connect to. | |
# (required). | |
database: special_blog_development | |
# Provides the hosts the default session can connect to. Must be an array | |
# of host:port pairs. (required) | |
hosts: | |
- <%= ENV['MONGOLAB_URI'] %> | |
database: <%= ENV['MONGOLAB_DB'] %> | |
username: <%= ENV['MONGOLAB_USER'] %> | |
password: <%= ENV['MONGOLAB_PASSWORD'] %> | |
options: | |
options: | |
test: | |
sessions: | |
default: | |
database: special_blog_test | |
hosts: | |
- localhost:27017 | |
options: | |
read: primary | |
# In the test environment we lower the retries and retry interval to | |
# low amounts for fast failures. | |
max_retries: 1 | |
retry_interval: 0 | |
production: | |
sessions: | |
default: | |
hosts: | |
- localhost:27017 | |
database: special_blog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment