Closed carols10cents closed 9 years ago
oh ffs. Nevermind, we have a hardcoded env var to MONGOHQ_URL so no, this doesn't work.
Ok. Since heroku doesn't have a standard env var name for all the mongo addons, I just made the config fall back through all the current options, so this should work for now for any mongo addon from heroku that someone might pick.
I made the last env var MONGO_URL; I think that's what we should recommend for non-heroku prod setups, and perhaps in the future I'll figure out how to make app.json find the one that's set and rename it to MONGO_URL either in the heroku config or in the ruby process before config/mongo.yml is loaded.
But this was the simplest thing that worked for now; I got a new instance deployed and functional through the heroku button on this branch.
Interesting. You have a few I don't have! For reference, I've been doing this monstrosity in mongo projects: https://github.com/hotsh/nelumba-mongodb/blob/master/lib/nelumba-mongodb.rb#L6-L11
yep. mongolab, mongohq/compose, and german based beta mongosoup.
Alright. This looks fine so far. I'm not sure how one could reasonably make it better. It's exactly the same kind of thing I do in other projects.
Hiiiiii @wilkie, moar guilt for yooooou!!!! :heart_eyes:
I was just trying out the heroku button again and it didn't work because Mongohq no longer offers their free sandbox plugin. Mongolab does, so this change gets it working again.