I have four Rails applications (with more coming). They share:
- stylesheets
- javascripts
- 3rd party gems
- some of the same ActiveRecord models
- our own ruby libraries
- configuration / environment variables
I also have a bunch of rabbitmq services that interact with the above Rails applications.
I'm trying to figure out how to sanely version control all this stuff. Right now, I have everything in one giant git repository, structured like:
/sites/rails1 /sites/rails2 /sites/rails3 /services/service1 /services/service2 /services/service2 /lib/our_code /lib/common_js /lib/common_css /config/common_configuration_files
Is this a sane way to do it?
If I were to break everything into their own git project, then it seems like it would suck to individually update each project each time a shared gem/library/css file was updated (with gems/bundler or whatever).
The unfortunate thing about having everything in one project is that I can't put one app or service on Heroku (easily).
Could git subtree merging help here? Maybe each site/service is its own branch?