Skip to content

Instantly share code, notes, and snippets.

@cwage
Created August 10, 2010 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwage/517276 to your computer and use it in GitHub Desktop.
Save cwage/517276 to your computer and use it in GitHub Desktop.
set :application, "textbookpartners"
set :deploy_to, "/home/98209/users/.home/symfony/#{application}"
set :domain, 'www.textbookpartners.com'
set :user, "dali.centresource.com"
set :use_sudo, false
# =============================================================================
# SCM OPTIONS
# =============================================================================
set :scm, :git
set :repository, "dali:textbook.git"
set :branch, :master
set :git_enable_submodules, 1
set :scm_user, 'dali.centresource.com'
# =============================================================================
# ROLES
# =============================================================================
# Modify these values to execute tasks on a different server.
role :web, domain
role :app, domain
role :db, domain, :primary => true
# =============================================================================
# CAPISTRANO OPTIONS
# =============================================================================
set :keep_releases, 3
set :deploy_via, :remote_cache
# action to symlink files
namespace :symlink do
desc "Symlink database config file."
task :db do
run "ln -nfs #{shared_path}/database.yml #{release_path}/config/database.yml"
end
desc "Symlink gitosis plugin config files."
task :gitosis do
run "ln -nfs #{shared_path}/gitosis/gitosis.rb #{release_path}/vendor/plugins/redmine-gitosis/lib/gitosis.rb"
run "ln -nfs #{shared_path}/gitosis/private_key #{release_path}/vendor/plugins/redmine-gitosis/extra/ssh/private_key"
run "ln -nfs #{shared_path}/gitosis/ssh_with_identity_file.sh #{release_path}/vendor/plugins/redmine-gitosis/extra/ssh_with_identity_file.sh"
end
end
after 'deploy:update_code', 'symlink:db'
after 'deploy:update_code', 'symlink:gitosis'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment