- Create a new SSH key pair:
ssh-keygen -t rsa -C "your user email"
- Call the key pair something unique: mynewheroku_rsa
- In the app folder, add Procfile
- Add the regular heroku remote:
git remote add heroku git@heroku.com:<appname>.git
- Edit the file
~/.ssh/config
Host mynewheroku
HostName heroku.com
IdentityFile ~/.ssh/mynewheroku_rsa
IdentitiesOnly yes
- Edit the file
.git/config
in the head of your folder. Add another remote, that uses the key-pair:
[remote "heroku-app"]
url = git@mynewheroku:<appname>.git
fetch = +refs/heads/*:refs/remotes/heroku/*
- Run heroku login, enter user/pass and select the key created in 1 as your key
- Now, you have 2 heroku remotes:
1. To push to heroku, use
git push heroku-app master
2. The original heroku will be used by the heroku console to control the app
- To change the heroku app to production, execute
heroku config:set NODE_ENV=production
- To add support for web sockets, execute
heroku labs:enable websockets
This is experimental!!!!! (to disable execute heroku labs:disable websockets
)