News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adam Patterson's Blog:
DIY simple staging server.
October 21, 2011 @ 10:29:41

Adam Peterson has posted an interesting idea for those out there running an internal staging server they want to constantly keep up to date with the main line of code (without manual intervention) - a git pull web frontend combined with git post-receive hooks.

This [move from svn to git] left a bit of a gap in my process where I could no longer test on a remote server without updating it manually by S/FTP or opening terminal and manually calling a git pull. Open terminal and manually git pull it did break up the work flow a bit so using the Dingo framework I created a very simple Git helper and gave it its own URL something like git/pull.

He added a post-receive hook to his git server that calls this "git/pull" URL on the staging server and updates the code on the server. This provides an easy asynchronous way to update things on another server. Note, though, that this should never be done on a publicly accessible server - it's a pretty large security hole (or at the very least made secure somehow). He used Dingo to create his interface, but something like the Slim micro-framework could have worked just as well. You can view his code on github.

0 comments voice your opinion now!
git pull workflow staging server postreceive hook


blog comments powered by Disqus

Similar Posts

Volker Dusch: If it's not written in PHP it's irrelePHPant!

Kevin van Zonneveld: It's Almost 2014 and We Are Still Committing Broken Code

DZone.com: PHP 5.4 Will Have a Built-in Web Server

User Group: Seattle User Group Meeting Tonight (3rd) - PHP on Azure & Git

Dennis Chung's Blog: Server Core + IIS7 + PHP + MySQL (and Wordpress)


Community Events





Don't see your event here?
Let us know!


symfony community language library laravel introduction opinion application podcast framework release security series version update interview install package composer voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework