I yanked most of this file from heroku guide to [getting discourse running on heroku](https://discussion.heroku.com/t/running-discourse-on-heroku/27)