NYCPHP Meetup

NYPHP.org

[nycphp-talk] Webserver file access (and version control)

Rob Marscher rmarscher at beaffinitive.com
Tue Aug 21 12:41:41 EDT 2007


On Aug 20, 2007, at 3:59 PM, Cliff Hirsch wrote:
> But...it's still an update and conflicts would be a bear to
> deal with in a production environment

You should check out Capistrano some time.  It pulls down the whole  
app from subversion into a new directory.  It then symlinks the  
current webroot to the new directory pulled from subversion.  You  
also keep files - like things users have uploaded - in a separate  
directory and symlink to that from your docroot too.  That way  
they're outside of the app directories.

What I like about this approach is that all the files still exist  
from the previous working state and if anything is wrong, you just  
switch the docroot symlink to point to the old directory - very quick  
recovery.

Capistrano is a ruby app the allows automated scripting and parallel  
updates on multiple servers at the same.  Worth looking into before  
rolling out your own custom shell scripts.

http://manuals.rubyonrails.com/read/chapter/97#page256
http://www.capify.org/getting-started/basics
http://www.simplisticcomplexity.com/2006/8/16/automated-php- 
deployment-with-capistrano





More information about the talk mailing list