Heroku generates database.yml from the DATABASE_URL environment variable like so: https://gist.github.com/liliakai/c161ad5704be04e88999
I'd like the resulting database.yml to include the line
host_names:
- my.customdomain.com
How would I encode this into the query string on the DATABASE_URL?
You can manually set attributes on the DATABASE_URL like so
$ heroku config:get DATABASE_URL
[copy returned value]
$ heroku config:set DATABASE_URL=[paste value]?host_names=my.customdomain.com
Note that this is fragile; promoting a new database, or reseting the credentials, will reset the DATABASE_URL. These kinds of additions will also cause the Heroku pgbackups add-on to not work.
Finally, this is not required for Discourse on Heroku – I just setup Discourse myself and didn't need it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With