deploy
This commit is contained in:
parent
56e4d9145f
commit
f7a84fedcb
3 changed files with 6 additions and 5 deletions
|
@ -18,5 +18,5 @@ set :default_env, {
|
|||
web_concurrency: '1'
|
||||
}
|
||||
|
||||
after 'deploy:published', 'puma:stop'
|
||||
after 'puma:stop', 'puma:start'
|
||||
after 'deploy:published', 'pumx:stop'
|
||||
after 'pumx:stop', 'pumx:start'
|
||||
|
|
|
@ -35,4 +35,4 @@ preload_app!
|
|||
|
||||
# Allow puma to be restarted by `rails restart` command.
|
||||
plugin :tmp_restart
|
||||
pidfile 'tmp/puma.pid'
|
||||
pidfile 'tmp/pids/puma.pid'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
namespace :pumo do
|
||||
namespace :pumx do
|
||||
desc 'Start puma'
|
||||
task :start do
|
||||
on roles(:web) do
|
||||
|
@ -14,7 +14,8 @@ namespace :pumo do
|
|||
task :stop do
|
||||
on roles(:web) do
|
||||
within current_path do
|
||||
execute "cat #{current_path}/tmp/puma.pid | xargs kill"
|
||||
pid = "#{current_path}/tmp/pids/puma.pid"
|
||||
execute "test -f '#{pid}' && cat '#{pid}' | xargs kill"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue