proggR Posted November 22, 2011 Share Posted November 22, 2011 I'm trying to think of the best way to deploy production updates for a website I'm working on. Right now I'm toying with the idea of using the master branch of a git repo for production. I would develop from a development branch and when it comes time to roll the updates into production I would make a staging branch from production and merge the develop branch into that, test and merge that into the master branch. With that said, does anyone see any issues with this strategy? What security measured should be taken if this is the process that gets used? I would limit read/write access to known computers using an ssh key. Are there any other things to take into account if I were to use git over ftp for deployment? Any thoughts would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/251621-git-as-a-deployment-strategy/ Share on other sites More sharing options...
trq Posted November 22, 2011 Share Posted November 22, 2011 I use a similar approach on a few projects without issue. I do however have update scripts that ensure no changes had been made (which they shouldn't have been anyway) within the production repo. There are usually a few other things that need to be scripted as well such as making sure permissions are correct and the the dist configs are copied into there correct location but yeah, overall, it works well. Quote Link to comment https://forums.phpfreaks.com/topic/251621-git-as-a-deployment-strategy/#findComment-1290562 Share on other sites More sharing options...
proggR Posted November 23, 2011 Author Share Posted November 23, 2011 Good to know, thanks. The place I work has a nightmare of a deployment strategy right now which got me thinking about how I will do it with my own projects. In the past I've just used FTP to copy my "staging" files to production but if I'm using git anyway during development I figured using the master branch for production made sense. Quote Link to comment https://forums.phpfreaks.com/topic/251621-git-as-a-deployment-strategy/#findComment-1290827 Share on other sites More sharing options...
trq Posted November 23, 2011 Share Posted November 23, 2011 I generally have a 'production' branch which my production servers track. Quote Link to comment https://forums.phpfreaks.com/topic/251621-git-as-a-deployment-strategy/#findComment-1290830 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.