lumi-api/lib/capistrano/tasks/pumx.rake
2020-02-26 12:37:04 -03:00

22 lines
445 B
Ruby

# frozen_string_literal: true
namespace :pumx do
desc 'Start puma'
task :start do
on roles(:web) do
within current_path do
execute :bundle, :exec, :puma, '--daemon'
end
end
end
desc 'Stop puma'
task :stop do
on roles(:web) do
within current_path do
pid = "#{current_path}/tmp/pids/puma.pid"
execute "test -f '#{pid}' && cat '#{pid}' | xargs kill ; :"
end
end
end
end