Dockhero is an add-on which turns any Docker image into a microservice attached to your Heroku app
If you think of Heroku add-ons in general as of boxes with some useful mechanisms inside (like databases, log analyzers, messengers etc.), then Dockhero is an empty box where you can put your own mechanism described by docker-compose.yml.
When you add Dockhero add-on to your Heroku application, a new Docker cluster (currently consisting of a single Swarm master) is provisioned, and it's address is exposed to your Heroku app via DOCKHERO_HOST environment variable.
We developed a CLI plugin which makes your Docker client talk to Dockhero instead of your default machine:
$ heroku dh:sh Now DOCKER is configured with Dockhero's Swarm endpoint This is a temporary change affecting the current shell session only sh$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Whenever in your console you need to simultaneously use Dockhero and the local Docker, you can use shortcuts:
heroku dh:docker <command> # execute docker <command> on Dockhero cluster heroku dh:compose <command> # call docker-compose <command> on Dockhero cluster
dh:compose shortcut assumes that your stack is named
It also makes your Heroku environment variables available via variables substitution, so that you don't have to commit your secrets into Git.
More than "just Docker"
Dockhero comes with a few features which help your microservice fit comfortably into Heroku ecosystem:
- The logs are streamed into Heroku logs. If for some reason you want to run apache or nginx as a microservice, you'll find access.log and error.log entries among your Heroku logs.
- Heroku environment variables are available in dockhero-compose.yml. This way you store the configuration of your microservice "the Heroku way" and don't commit your secrets into git.
- CDN and SSL termination. This is especially useful when you consume the microservice directly from the front-end
- EBS volumes with daily backups. Please contact support if you need to restore your data from a backup