Created
July 24, 2008 01:01
-
-
Save oliyoung/1977 to your computer and use it in GitHub Desktop.
Capistrano deploy script with mongrel specifics
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set :application, "application.url.com" | |
set :repository, "http://svn.#{application}/trunk/" | |
set :runner, ENV['LOGNAME'] | |
set :deploy_to, "/var/www/#{application}" | |
role :app, application | |
role :web, application | |
role :db, application, :primary => true | |
task :after_update_code, :roles => :app do | |
run "ln -s #{deploy_to}/shared/system/mongrel_cluster.yml #{release_path}/config/mongrel_cluster.yml" | |
run "ln -s #{deploy_to}/shared/system/database.yml #{release_path}/config/database.yml" | |
end | |
namespace :deploy do | |
task :spinner, :roles => :app do | |
run "/usr/bin/mongrel_rails cluster::restart --clean --config #{release_path}/config/mongrel_cluster.yml" | |
end | |
task :start, :roles => :app do | |
run "/usr/bin/mongrel_rails cluster::start --clean --config #{deploy_to}/current/config/mongrel_cluster.yml" | |
end | |
task :restart, :roles => :app do | |
run "/usr/bin/mongrel_rails cluster::restart --clean --config #{deploy_to}/current/config/mongrel_cluster.yml" | |
end | |
task :stop, :roles => :app do | |
run "/usr/bin/mongrel_rails cluster::stop --clean --config #{deploy_to}/current/config/mongrel_cluster.yml" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment