Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to organize 50 related rails apps with git?

I'm embarking with 50 related rails apps that will have minor differences between them - the css may differ and maybe each app will have different routes and different titles for the views for the sake of SEO and so on.

But i want all 50 apps to be consistent when i change other things. So basically i will have to end up with my own cms and each website will have different settings.

I'm sure i'm not the first person to encounter this problem. How would i go about organizing this while using Rails, git, github and heroku so that when i deploy, all apps update and remain consistent but still hold their own settings?

like image 815
Tom Avatar asked Dec 17 '25 14:12

Tom


2 Answers

I fork a base project and keep it as "upstream". I clone the forked project in my development environment and keep it as "origin". So my development environment has an origin and an upstream.

When I do something that effects all forked projects, I do the change in upstream, then I go into each project, pull from upstream and merge.

You can also have a hierarchy of upstreams and keep them synchronized with the original upstream.

like image 157
nurettin Avatar answered Dec 20 '25 04:12

nurettin


If those are purely configuration files, the best approach is to follow the Heroku page "Configuration and Config Vars":

Don't put those files in a Git repo itself.

Use the Heroku CLI’s config, config:add, config:get and config:remove to manage your config vars

like image 36
VonC Avatar answered Dec 20 '25 05:12

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!