Reputation: 3507
I'm developing two very similar Express apps that share the same codebase and are checked into one central git repository. There are small differences toggled via environment variables.
How can I deploy the same code two different Heroku sites?
Upvotes: 1
Views: 35
Reputation: 2528
Use heroku config to set the appropriate environment variables for each app:
heroku config:set FLAVOR=Chocolate -a app1
heroku config:set FLAVOR=Strawberry -a app2
Create git remotes for each app (this is using the same name for the remote as the app name):
heroku git:remote --remote app1 -a app1
heroku git:remote --remote app2 -a app2
Push to each app:
git push app1
git push app2
Upvotes: 2