我是 Rails 开发新手,我的问题是:我有一台带有虚拟机的服务器,在 Capistrano 部署期间,ngnix乘客没有重新启动。
日志:
14915 pts/2 S+ 0:00 tail -f -n 0 /home/deployer/parking/releases/20151013115625/log/production.log
14916 pts/2 S+ 0:00 tail -f -n 0 /home/deployer/parking/releases/20151013115625/log/passenger.4324.log
14942 ? Sl 0:00 Passenger RubyApp: /home/deployer/parking/releases/20151013115625/public (production
部署.rb:
set :deploy_to, '/home/deployer/parking/'
set :passenger_port, 4324
set :passenger_in_gemfile, true
set :passenger_restart_with_touch, true
set :keep_releases, 5
namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
end
end
end
after 'deploy:publishing', 'deploy:restart'
set :passenger_restart_command, 'passenger-config restart-app'
set :passenger_restart_options, -> { "#{deploy_to} --ignore-app-not-running" }
添加这个
set :passenger_roles, :all