11

I'm managing a team of 4 developers. We develop CMS based sites on a PHP / MySQL backend.

I want to improve the workflow. What i want:

enter image description here

  • Are there any services that host a git repo and sync it automatically with the servers?
  • Production server would be master branch
  • Testing server would be a different branch
  • we deal with many small sites and some large so we need workflow to be fast and agile
  • WHAT ABOUT THE DATABASE ? lol

(if anyone wants to add to the diagram PSD file can be found here: workflow.psd

AndrewMcLagan
  • 13,459
  • 23
  • 91
  • 158
  • 1
    Have you seen http://www.github.com? It has hooks that you can set up to trigger pulls to your server – seanbreeden Mar 09 '13 at 03:13
  • i second github, it also allows you to have private repo's given you purchase an upgraded account. – Hydra IO Mar 09 '13 at 03:15
  • trigger? how? where? tell me more... lol – AndrewMcLagan Mar 09 '13 at 03:15
  • does your team understand simple `git` commands via terminal? it's pretty extensive once you start really getting into it. – Hydra IO Mar 09 '13 at 03:20
  • 1
    I recommend BitBucket.org as a possible alternative to GitHub. It provides much of the same functionality, and allows free private repos for small teams. – Brad Mar 09 '13 at 03:22
  • @Brad nice find, I might have to try these guys out, possibly save my 8 bucks a month for github ;) – Hydra IO Mar 09 '13 at 03:25
  • ya i have heard of them, my team does not understand git at all... although i was hired as a senior developer recently and plan on changing that.. does bitbucket have automatic staging to servers? – AndrewMcLagan Mar 09 '13 at 03:28
  • 3
    The company behind BitBucket is Atlassian, which has a nice product called Stash, if you're in a more corporate-y environment. As far as automatic staging to servers, I believe this can be accomplished via hooks in git. With the workflow or prod branches and dev branches look at GitFlow – R Down Mar 09 '13 at 04:03

1 Answers1

4

I'd highly suggest using Beanstalk if you want something quick and easy to set up. It handles deployments very well. If you're looking at doing a bit more yourself (setting up the hooks and such) then another option would be github.

Please do not user Master as your production branch, master should never be production. A better workflow would be to have a Staging, Development, and Production branch / environment. Please see this guide about branching on Beanstalk's guides, it's pretty insightful.

As for keeping track of databases, if your framework / cms doesn't support database migration I'd highly suggest developing some form of migration / database version control in-house. You can also check out a framework like FuelPHP, which has migration built in. A nice little database version control system I found while poking around : dbv.php.

Kisuka
  • 1,832
  • 1
  • 15
  • 10
  • 1
    So it seems that its best to develop in the main branch and have separate branches for staging and production. +1 for that tip, previously i have worked main branch production, subbranches for development and staging – AndrewMcLagan Mar 09 '13 at 10:54
  • No problem :) Yeah, Master should ALWAYS be used as the main development. It's in the same sense as Trunk is the main development branch for SVN. – Kisuka Mar 09 '13 at 11:14