在 Capistrano 部署文件中重新启动乘客的正确方法

问题描述 投票:0回答:1

我是 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" }
ruby-on-rails ruby capistrano passenger
1个回答
0
投票

添加这个

set :passenger_roles, :all

© www.soinside.com 2019 - 2024. All rights reserved.