Skip to content

Instantly share code, notes, and snippets.

@garrensmith
Created September 25, 2012 08:12
Show Gist options
  • Select an option

  • Save garrensmith/3780575 to your computer and use it in GitHub Desktop.

Select an option

Save garrensmith/3780575 to your computer and use it in GitHub Desktop.
Capistrano, Unicorn, Upstart and Bluepill
after "deploy:restart", "deploy:restart_workers"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
sudo 'start bluepill_conf'
end
task :stop, :roles => :app, :except => { :no_release => true } do
sudo "bluepill stop"
sudo "stop bluepill_conf"
end
task :restart, :roles => :app, :except => { :no_release => true } do
sudo "bluepill restart unicorn"
end
desc "Restart Resque Workers"
task :restart_workers do
sudo "bluepill stop resque"
sudo "bluepill start resque"
end
desc "Start Resque Workers"
task :start_workers do
sudo "bluepill start resque"
end
desc "Stop Resque Workers"
task :stop_workers do
sudo "bluepill stop resque"
end
end
namespace :bluepill do
desc "Prints bluepills monitored processes statuses"
task :status, :roles => [:app] do
sudo "bluepill status"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment