Deploying Drupal projects: git + capistrano

Submitted by alexmoreno on Sun, 02/10/2013 - 04:32

 

removing some folders from git, file .gitignore with these contents:

 

# Ignore paths that contain generated content.

cache/

files/

sites/*/files

sites/*/private

 

 

 

Using symbolic links for /files directory:

 

 

namespace:custom do

    task:symlink do

      run "ln -s /var/www/crucerista/sites/crucerista.net/files/ /var/www/crsta/current/sites/crucerista.net/"

      run "echo 'finished'"

    end

end

after "deploy","custom:symlink"

 

 

Related links:

Similar technique, but aplied to Rails apps: http://www.practicalecommerce.com/blogs/post/468-Creating-Symlinks-When-Deploying-a-Rails-Application

Another idea, File Transfer actions in Capistrano: http://www.simonecarletti.com/blog/2009/02/capistrano-uploads-folder/