Modified for Heroku deployment, as described at https://github.com/MichaelCPell/discourse/commit/bedc21e9c9365fc579add3532ae0707f77f0bd5c