On Thursday, August 18, 2011, Zeedy elucidated thus:
> In order to preserve some config files (such as my .htaccess file
> that is stored in the application's web root), I wrote an after
> callback that is triggered after finalize_update and creates
> symlinks to the config files which I now keep in the Cap
> shared/system directory.  How are other people doing this?

We have a file called ".shared" that lives in the top level of the 
deploy directory (above the main 'html' directory).  This file contains 
a list of directories (or files) that are shared between deployments.

In the top level directory where the site is deployed, there is a 
"shared" directory.  During deploy, we check to make sure all 
directories referenced in .shared exist in 'shared'.

Then, after the files are copied over, we do an rsync from the deploy 
into the 'shared' directory of each item mentioned in .shared. BUT we 
use rsync options that only copy if the file is newer. Thus, it will 
only copy from our code base if the code base has a newer copy. Thus, 
changes made locally won't be overwritten.

Then, the script deletes anything mentioned in .shared from the main 
deploy directory, and then symlinks the directory or file back in to the 
appropriate place in the deploy directory, pointing to the relevent 
location in the 'shared' tree.

That's just a high-level overview...let me know if you have questions.

j

-- 
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com - Fairbanks, AK
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to