【发布时间】:2017-07-07 09:18:52
【问题描述】:
将我的ruby 从2.2.4 升级到2.4.1 后,我开始面临这个问题。
我的服务器会在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
任何关于如何诊断问题的帮助也会很好。
【问题讨论】: