22 lines
391 B
Ruby
22 lines
391 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
namespace :pumo 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
|
||
|
execute "cat #{current_path}/tmp/puma.pid | xargs kill"
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|