0

I'm setting up a custom built e-commerce project. One site will be for the UK and another inside another country, with the possibility of adding more at a later date. However, the sites have different integrations e.g. payment systems, warehousing etc. I want to keep to the databases separate as the sites will be running on separate servers.

The issue i'm having is how to manage the sites. Ideally i'd like to have a master branch. So if say, i want to update the header of the website i can make the change, then roll it out to all websites. Rather than having to make the same change multiple times. However, some of the view logic might be different due to the integrations. So i need to keep the code separate. Should i create separate branches for each country/site? Then branch off of the master branch when i want to make a change to all sites? Also, each site will need to have a staging & live site. So in my head it looks like something like this:

Master
    Branch -> (Quick template change for all sites)
    UK
        Staging
        Live
    Country Two
        Staging
        Live
    Country Three
        Staging
        Live

Or do i keep the projects separate in the repo? So have Main project, then create forks from that main repo?

I hope this makes sense, any help would be appreciated.

JDavies
  • 2,730
  • 7
  • 34
  • 54
  • Hey, You can have different setting files, in that you can have the different app, other configuration related to country, like have different db, different payment system module, on the basis of settings value we can easily pick the which payment system we can use that. – aman kumar Jun 19 '18 at 11:07
  • Hey. Yeah I understand that as mentioned above. However, the apps are the same. But some of the view logic might be different. – JDavies Jun 19 '18 at 11:11
  • Sorry, i'm looking for help on the setup / structure of the project to make managing the sites going forwards easier. I'm not sure how your comments have help? – JDavies Jun 19 '18 at 11:22

1 Answers1

0

Found an approach which I think will work for me - Best practice setup for two websites with different style sheets and templates, but similar Django back end

Basically will have a Master repo containing the whole project, which i can make changes to templates, css etc. Then have have seperate repos (clones) for the separate sites. Then when then integrations are different, keep the logic outside of the files that could clash. So when doing a pull from the Master repo, i won't have any conflicts.

JDavies
  • 2,730
  • 7
  • 34
  • 54