Skip to content

Instantly share code, notes, and snippets.

View biti's full-sized avatar

liuzihua biti

View GitHub Profile
@biti
biti / Capistrano tasks for starting unicorn.rb
Created September 7, 2011 03:26 — forked from vvalgis/Capistrano tasks for starting unicorn.rb
Capistrano tasks for starting unicorn
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
end
task :stop, :roles => :app, :except => { :no_release => true } do