Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Build a Git based updatesystem for a multiple hosting-environment in combination with Directa

Situation We are hosting multiple webshops (open-cart) on multiple servers. Every webshop has its own user environment in DirectAdmin so we can connect a domain to the webshop. The webshops are mostly unique but they can differ in code due to some custom modules we develop for them. The code base is for every webshop the same. Currently updates are excecuted with DirectAdmin (Installatron/FTP). This is a time consuming job and sensitive to errors.

Goal I want to improve te development structure to connect it to Git (Bitbucket). I build a local development server that is connected to Bitbucket. This is working well. We want to connect the different webshops with Bitbucket but we want to control the updates our selves to have control over which webshops are getting a new update and when.

What we have done so far.. I build a new backend and frontend by which I import the different webshops through the DirectAdmin API. I have written a shell script I can upload to the webshops. This shell script is creating a new repository in the webshops' public_html and adds a new remote from Bitbucket. I then try to merge the origin from bitbucket with the existing repo on the server. The point is to have no merge conflicts because everything is handled through the new backend. I first try to reset the repo to origins'master branch, but then important (custom) files are lost like the .htaccess files and custom modules that are not included (yet) in the codebase on Bitbucket. Now it is getting pretty complex due to the diversity of the webshops. I cannot find a solution to automaticly merge the origin/master on the shop without losing files and custom modules.

Tried solutions

  • Different merge strategies (theirs/ours)
  • Working with git reset --hard

What I'm looking for I'm looking for alternatives to set up a proper development structure that fits our server-structure (DirectAdmin /user-packages) and being able to connect this to Git (Bitbucket).

So I hope that someone has been in this case before and have a great Idea! Thanks alot ;)

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

139 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you