0
ruby
2.2.4
から2.4.1
にアップグレードしました。「cap deploy」はpumaを再起動しませんが、「deploy deploy:restart」は
私のサーバーはcap deploy
の後にダウンしますが、作業の直後にcap deploy:restart
を実行します。
Capfile:
require 'capistrano/puma'
require 'capistrano/puma/jungle'
deploy.rb:
# ...
namespace :deploy do
# after :restart, :clear_cache do
# on roles(:web), in: :groups, limit: 3, wait: 10 do
# # Here we can do anything such as:
# # within release_path do
# # execute :rake, 'cache:clear'
# # end
# end
# end
desc 'Initial Deploy'
task :initial do
on roles(:app) do
before 'deploy:restart', 'puma:start'
invoke 'deploy'
end
end
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
invoke 'puma:restart'
end
end
before :starting, :check_revision
# after :finishing, :compile_assets
after :finishing, :cleanup
after :finishing, :restart
# https://github.com/airbrake/airbrake#capistrano
after :finished, 'airbrake:deploy'
end
問題を診断する方法上の任意の助けも同様に素晴らしいことです。