Define a postdeploy action in your app.json file to ping Honeybadger when you deploy your Rails app to a Dokku instance.
The Honeybadger CLI deploy command requires you set the --repository and --revision options.
You can use environment variables for this, or for example hardcode your repository URL (as in the example below).
Dokku provides a $GIT_REV environment variable by default, which is useful to set the --revision option.
Note that using the release stanza in Procfile for this won't work, as the $GIT_REV environment variable isn't set in that phase of the release.
Here's a sample app.json file that accomplishes this.
{
"scripts": {
"dokku": {
"postdeploy": "bundle exec honeybadger deploy --environment=production --repository <YOUR_REPOSITORY_URL> --revision $GIT_REV"
}
}
}