Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (27 sloc) 1.076 kb
Capistrano::Configuration.instance(:must_exist).load do
desc 'Set the target stage to staging'
task :staging do
set :stage, :staging
end
desc 'Set the target stage to test'
task :testing do
set :stage, :test
end
# None of this works in a namespace
desc 'Set up stage-dependent properties'
task :setup_stage do
set :base_dir, "#{cookbook[:base_dir]}/#{stage}"
set :deploy_to, "#{base_dir}/#{application}"
set :db_table, application + (stage == :staging ? "_#{stage}" : '')
set :mongrel_port, cookbook[:mongrel_port] + production_mongrels if stage == :staging
set :domain, cookbook[stage][:domain]
set :domains, (cookbook[stage][:other_domains] || []) + [ domain ]
set :branch, cookbook[stage][:branch] || 'master'
set :mongrels, cookbook[stage][:mongrels]
set :auth_user, cookbook[stage][:auth_user]
set :auth_pass, cookbook[stage][:auth_pass]
role :app, domain
role :web, domain
role :db, domain, :primary => true
end
end
Jump to Line
Something went wrong with that request. Please try again.