Heroku and Github integration (how to structure the project)

后端 未结 4 502
余生分开走
余生分开走 2020-12-09 08:37

I\'m creating a webservice and I want to store the source on github and run the app on heroku. I haven\'t seen my exact scenario addressed anywhere on the \'net so far, so

4条回答
  •  感情败类
    2020-12-09 09:28

    Here's a simple solution that may or may not work for you.

    • Create two projects on GitHub. One project should be just the Rails app (i.e. everything inside the Rails app directory). The other project should be everything outside the Rails app directory.

    • Add the Rails app project as a git-submodule within the "container" project.

    • Now you can add Heroku as a remote on the Rails app repository separately and push it to heroku. Heroku will accept the push because it is just a Rails app with the expected directories and files.

提交回复
热议问题