Sha256: 0c2afc0ff72877c032e367a1c05751ab8660e7017b0a5a204d3d6f88612696c0
Contents?: true
Size: 1.06 KB
Versions: 29
Compression:
Stored size: 1.06 KB
Contents
namespace :rubber do namespace :unicorn do rubber.allow_optional_tasks(self) before "deploy:stop", "rubber:unicorn:stop" after "deploy:start", "rubber:unicorn:start" after "deploy:restart", "rubber:unicorn:reload" desc "Stops the unicorn server" task :stop, :roles => :unicorn do rsudo "if [ -f /var/run/unicorn.pid ]; then pid=`cat /var/run/unicorn.pid` && kill -TERM $pid; fi" end desc "Starts the unicorn server" task :start, :roles => :unicorn do rsudo "cd #{current_path} && bundle exec unicorn_rails -c #{current_path}/config/unicorn.rb -E #{Rubber.env} -D" end desc "Restarts the unicorn server" task :restart, :roles => :unicorn do stop start end desc "Reloads the unicorn web server" task :reload, :roles => :unicorn do rsudo "if [ -f /var/run/unicorn.pid ]; then pid=`cat /var/run/unicorn.pid` && kill -USR2 $pid; else cd #{current_path} && bundle exec unicorn_rails -c #{current_path}/config/unicorn.rb -E #{Rubber.env} -D; fi" end end end
Version data entries
29 entries across 29 versions & 1 rubygems