Skip to content

Instantly share code, notes, and snippets.

@syntaxhacker
Forked from tibawatanabe/set-heroku-config-vars.sh
Last active January 3, 2021 19:36
Show Gist options
  • Save syntaxhacker/8907779b79e29a913cdcc0b8e9c367eb to your computer and use it in GitHub Desktop.
Save syntaxhacker/8907779b79e29a913cdcc0b8e9c367eb to your computer and use it in GitHub Desktop.
Command line to set Heroku config vars
1. Export existing app’s variables to config.txt
heroku config -s -a existing-heroku-app > config.txt
2. Review and push to another app
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app
heroku container:login
docker tag thisk8brd/node-react-starter-app:prod registry.heroku.com/<HEROKU-APP-NAME>/web
heroku container:release web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment