Skip to content
This repository

August Ash recipes for Capistrano

Fetching latest commit…

Cannot retrieve the latest commit at this time


Deploying Drupal example

The capistrano/ash/drupal library takes a hash of Drupal multisites in the following format.

set :multisites, {"default" => "", "another" => ""}

where each key is a folder in your sites directory and each value is the URL of the multisite. If you are not using multisites, just exclude the :multisites variable definition.

Deploying Zend or Zend/Doctrine example

    # Capfile
    load 'deploy' if respond_to?(:namespace) # cap2 differentiator

    # Define available stages
    set :stages, %w(staging production)
    set :default_stage, "staging"

    # --------------------------------------------
    # Define required Gems/libraries
    # --------------------------------------------
    require 'ash/zend_doctrine'

    # --------------------------------------------
    # Setting defaults
    # --------------------------------------------
    # IP-address or host's servername
    role :app, ""
    role :web, ""
    role :db,  "", :primary => true

    # Application settings.
    set :application, "best_app_ever"

    # VCS information.
    set :repository, ""
    set :scm_username, "SVN_USER"
    set :scm_password, proc{Capistrano::CLI.password_prompt("Subversion password for '#{scm_username}':")}

    # SSH login credentials
    set :user, "SSH_USER"
    set :password, proc{Capistrano::CLI.password_prompt("SSH password for '#{user}':")}

    # --------------------------------------------
    # Calling our Methods
    # --------------------------------------------
    after "deploy:setup_shared", "app:setup_shared"
    after "zend:symlink", "app:symlink"

    # --------------------------------------------
    # Application Specific Custom Methods
    # --------------------------------------------
    namespace :app do
      desc "Setup shared directories and permissions specific to the application"
      task :setup_shared, :roles => :web, :except => { :no_release => true } do
        run "mkdir -p #{shared_path}/media"
        sudo "chmod -R 777 #{shared_path}/*"

      desc "Symlink shared directories specific to the application"
      task :symlink, :except => { :no_release => true } do
        run "ln -nfs #{shared_path}/media #{current_release}/public/media"
Something went wrong with that request. Please try again.