To install the vars config for the Heroku application, you do the following:
$ heroku config:set GITHUB_USERNAME=joesmith
How can I install config var with the contents of the file?
Take a look at the heroku-config plugin, which adds the heroku config:push command to enter key-value pairs in a file named .env to the application.
heroku-config
heroku config:push
.env
It also has a heroku config:pull command to do the opposite and works great with foreman to run the application locally using config in .env .
heroku config:pull
foreman
https://github.com/xavdid/heroku-config
I know that it is too late, but still it will be useful for future users who will be here.
I also wanted a quick solution to add a variable to the heroku application, but copy-paste is so boring. Therefore, I wrote a script to read the values ββfrom the .env file and install it in the requested application - all things are passed as an option:
https://gist.github.com/md-farhan-memon/e90e30cc0d67d0a0cd7779d6adfe62d1
./bulk_add_heroku_config_variables.sh -f='/path/to/your/.environment/file' -s='bsc-server-name' -k='YOUR_CONFIG_KEY1 YOUR_CONFIG_KEY2'