Skip to content

Instantly share code, notes, and snippets.

@devopsmariocom
Created July 11, 2010 19:17
Show Gist options
  • Save devopsmariocom/471758 to your computer and use it in GitHub Desktop.
Save devopsmariocom/471758 to your computer and use it in GitHub Desktop.
set :application, "website"
set :scm, :git
set :ssh_options, { :forward_agent => true }
set :repository, "[email protected]:user/#{application}.git"
set :repository_cache, "git-cache"
set :deploy_via, :remote_cache
role :web, "dev.server.com"
role :app, "dev.server.com"
role :db, "dev.server.com", :primary => true
namespace :deploy do
task :start, :roles => :app do
deploy.mongrel.start
end
task :stop, :roles => :app do
deploy.mongrel.stop
end
task :restart, :roles => :app, :except => { :no_release => true } do
deploy.mongrel.restart
end
namespace :mongrel do
[ :stop, :start, :restart ].each do |t|
task t, :roles => :app do
run "umask 02 && cd #{current_path} && mongrel_rails cluster::#{t}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment