I have some source code managed by git that I want to push to Heroku. The source code contains multiple different products, some of which will have their own heroku instance. So something like this:
src/
lib-files/
app1/
app2/
app3/
other-files/
package.json
So in heroku, I have an instance for app1 and app2. Both of these rely on ./lib-files and package.json but not on app2 or app3 or other-files.
I don't really want to push the entire git repository containing all the files to heroku for each app. In other words, I don't want the app1 instance to contain the code for app2 or app3 or other-files because there is a lot of data that it doesn't need and it takes for ever to copy it up.
I got around this by creating new git repos for each app (one that just contains the stuff app1 needs and one for app2, etc) and then pushing those individual repos to heroku. This works, but seems a bit hacky because I have all these other extra repositories that I have to manage. Also, if other devs want to be able to push to heroku I need to make those repos available to them, maybe by checking them into git (seems bizarre).
What is a good way to accomplish this?
Update:
What if I created the heroku repos so they only contained the appropriate stuff for each app then just let heroku be the primary remote for those repos (as opposed to github)? I would still have multiple repositories to deal with, but at least all the devs would have a standard place from which to clone them (the source code repo being in github and the heroku deployment repos being in heroku). Thoughts on that?