Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Andrew Showalter
Andrew Showalter
14,028 Points

Advanced Version Control Architecture - How to maintain multiple installs of a website/application for clients

I have a question that combines multiple concepts.

I do a lot of work with real estate agents and I am working on building a complete solution using Laravel where we build one awesome framework for a website, but allow clients to add style touches such as color scheme, logos, etc.

My question is how do you use a version control system such as Git so that when you push files to your master branch for the core files, all of the production websites you have deployed are updated.

We may have 20 clients running the application on different servers. How can you set up some sort of "call back" that checks for updates to the version of the core files and merges those with the production applications of those various clients. I am thinking about something like Wordpress where your core files are updated automatically from the main repo.

I imagine there is some sort of listener class that looks back to the main repository on a timed interval to check for a different version, but, this is just a guess.

I am open to any ideas, concepts, code examples, resources, or anything that could point me in the right direction on how to accomplish this.

I would also like to know ;)

2 Answers

Marek Hrusovsky
Marek Hrusovsky
4,217 Points

What about script that would run daily on customer server? (using CRON...)

Thiago de Bastos
Thiago de Bastos
14,556 Points

Hi Andrew Showalter ! I too have contemplated this and have decided to leave this for when I have the same workload as you. I tend to want to be prepared for EVERYTHING!

Anyhow, check out these resources, they are based around WordPress but they will be relevant to you.

The following links may or may not be what you are looking for but hopefully they will point you in the right direction!


Tools:

Capistrano for deployment to multiple servers.

Articles:

WordPress Deployments with Git WordPress Deployment with Deploy, Git and Bitbucket DEPLOYING WORDPRESS USING GIT AND CAPISTRANO

Videos:

Keeping WordPress under version control with Git