Deploy two separate heroku apps from same git repo

前端 未结 4 1057
梦谈多话
梦谈多话 2020-12-08 07:59

Within one git repo, I have two separate applications (web server and API server).

How can I deploy each application to its own Heroku app?

(So there

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-08 08:35

    When you have to separate application then you can simply push repository sub-tree to each.

    Setup remotes once

    heroku git:remote --remote heroku-client -a client-app
    heroku git:remote --remote heroku-server -a server-app
    

    And then you can deploy through pushing sub-tree to the remote

    git subtree push --prefix client heroku-client master
    git subtree push --prefix server heroku-server master
    

    (where --prefix points to app's root folder)

提交回复
热议问题