我有一个分为两部分的应用程序(Phoenix API和React前端),我想将其部署到Heroku ...后端和前端需要在单独的服务器上运行,但是当前的应用程序结构类似于所以:
app/
|
+ Phoenix/
|
+ React/
|
+ .git/
因此,应用程序的两个部分都在同一个git repo中。
在其中app/
,我创建了两个不同的Heroku应用-我将它们称为phoenix-heroku-app
和react-heroku-app
。我的计划是使用git子树方法将这些应用程序推送到Heroku,但是我不确定如何指定每个应用程序的位置。
当我运行时heroku apps
,此正确列出
phoenix-heroku-app
react-heroku-app
所以他们都在那里...但是当我使用类似的命令时
$ git subtree push --prefix Phoenix heroku master
$ git subtree push --prefix React heroku master
将这些推送指向正确应用的语法是什么?
遵循@bouteillebleu的建议,我能够这样处理...
首先,我需要在父目录中为两个应用添加Heroku端点-
$ git remote add phoenix-heroku-app https://git.heroku.com/phoenix-heroku-app.git
$ git remote add react-heroku-app https://git.heroku.com/react-heroku-app.git
那我只需要跑步
$ git subtree push --prefix Phoenix phoenix-heroku-app master
$ git subtree push --prefix React react-heroku-app master
很高兴去。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句