Files
nairobi/lib/capistrano/tasks/restart.cap
voodoorai2000 e3c6fc77c6 Update Unicorn restart task
We are using a simple unicorn.rb file in the Installer, which requires a different way of restarting the server

This task is still a little limited and hackish but it does the job for now 😌

We are killing any existing unicorn process and starting unicorn. It checks for existing processes in both the standard consul folder and in the capistrano `current` folder, and skipping any exception if unicorn was not running.
2018-09-21 15:39:56 +02:00

8 lines
361 B
Plaintext

desc 'Restart Unicorn'
task :restart do
on roles(:app) do
execute "kill -QUIT `cat /home/deploy/consul/pids/unicorn.pid`; true"
execute "kill -QUIT `cat /home/deploy/consul/shared/pids/unicorn.pid`; true"
execute "cd /home/deploy/consul/current && /home/deploy/.rvm/gems/ruby-2.3.2/wrappers/unicorn -c config/unicorn.rb -E production -D"
end
end