Variables Substitution
docker-compose
supports Envrironment Variables Substitution like this:
web:
environment:
- FOO="${FOO}"
Dockhero CLI plugin changes the rules of variable resolution to the following:
Your shell ENV has top priority, e.g.
env FOO=bar heroku dh:compose up
Your Heroku app's variables have the next priority, e.g.
heroku config:set FOO=bar; heroku dh:compose up
The variables from your
.env
file have the least priority
Setting a Heroku Environment variable is the recommended way to store your shared secrets and tokens in production
Besides the variables from your Heroku config, Dockhero CLI plugin makes the following enviroment variables available to the app:
DOCKHERO_HOST - address of your docker machine
HEROKU_APP_URL - URL of the Heroku app which owns the add-on (e.g. https://your-app.herokuapp.com)