Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git strategy to use in deploying white label instances to different sub domains.

I have a situation where which git strategy is suitable to use?

Situation :

We have one application which has a git repository. In which we follow the branching strategy,

  1. Branch : develop : used by all developers to implement the features

  2. Branch : testing : where the code developed till current gets deployed to test the application.

  3. Branch : production : After approval from testing team we merge testing branch to production & deploy it to production environment.

Problem :

  1. Now we have 3 different installations of the production (site1.mainDomain.com, site2.mainDomain.com,site3.mainDomain.com), these 3 installations has different headers (logo, header color) for now.

  2. There can be possibility that site1.mainDomain.com has some set of features that can be developed in future & can be only used for site1.mainDomain.com.

  3. Some future features can be common for site1.mainDomain.com, site2.mainDomain.com but not for site3.mainDomain.com.

  4. Now if there is any issue on production of site1.mainDomain.com & which is the major issue from the base branch, how we are gonna manage this thing.

So for achieving this which git strategy is useful? I was reading about sub-modules, git sub-tree, git patches.. but little bit confused to make the decision. Please suggest the best possible solution and strategy to follow.

Thanks in advance. Vijay

like image 800
Vijay Kumbhar Avatar asked Nov 12 '12 08:11

Vijay Kumbhar


1 Answers

I think you are looking at the wrong place (version control system) for solving this problem. In this kind of situation I would usually create different settings files for different contexts, keep all of those in the same git branch, and just have a small local configuration file for each deployment (mostly choosing the right context). Then your code can check, based on the context, what kind of content to show.

I would strongly recommend against making different feature branches for each site, because that will get you into an untidy mess and constant merge conflict resolving really fast.

like image 177
user1338062 Avatar answered Nov 07 '22 23:11

user1338062