adding heroku-friendly mongo config
This commit is contained in:
parent
e9009ea609
commit
30e655fd6c
1 changed files with 5 additions and 2 deletions
|
|
@ -2,8 +2,11 @@
|
||||||
# licensed under the Affero General Public License version 3. See
|
# licensed under the Affero General Public License version 3. See
|
||||||
# the COPYRIGHT file.
|
# the COPYRIGHT file.
|
||||||
|
|
||||||
|
if ENV['MONGOHQ_URL']
|
||||||
MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
|
MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}}
|
||||||
|
else
|
||||||
|
MongoMapper.connection = Mongo::Connection.new('localhost', 27017)
|
||||||
|
end
|
||||||
|
|
||||||
MongoMapper.database = "diaspora-#{Rails.env}"
|
MongoMapper.database = "diaspora-#{Rails.env}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue