简体   繁体   English

Capistrano + NGINX Passenger重启Rails应用程序

[英]Capistrano + NGINX Passenger Restart Rails App

I've finally gotten capistrano to work on my website, however, I cannot seem to get the restart part of the application to work. 我终于让capistrano在我的网站上工作,但是,我似乎无法让应用程序的重启部分工作。 What I want todo is setup capistrano to restart the mongrel cluster that is running the rails app after a deploy has gone through. 我想要todo是设置capistrano重新启动部署完成后运行rails应用程序的mongrel集群。 Since I used passenger to install everything, I have no clue how to restart the mongrel cluster. 由于我使用乘客安装所有东西,我不知道如何重新启动杂种群集。

Does anyone know how todo this? 有谁知道如何做到这一点? In each tutorial that I've read, it mentions that there should be a restart.txt file in the /tmp folder of the app, however I cannot find anything that explains how to restart it... or what to put in the file. 在我读过的每个教程中,它都提到应用程序的/ tmp文件夹中应该有一个restart.txt文件,但我找不到任何解释如何重新启动它的文件......或者放在文件中的内容。

I think adding this task to your deploy.rb file should do 我认为将此任务添加到deploy.rb文件中应该这样做

namespace :deploy do
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end
end

Basically this will run the touch tmp/restart.txt in the rails root directory which will restart passenger 基本上这将在rails根目录中运行touch tmp/restart.txt ,这将重启乘客

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Nginx / Passenger / Capistrano上的Rails应用程序:资产不起作用 - Rails app on Nginx/Passenger/Capistrano: assets not working Passenger,Nginx和Capistrano - 乘客根本没有启动Rails应用程序 - Passenger, Nginx, and Capistrano - Passenger not launching Rails app at all Nginx 使用 capistrano 滚动重启 Rails 应用程序 - Nginx rolling restart of Rails app with capistrano Rails 应用程序登录 ubuntu 服务器(nginx+passenger+capistrano)在哪里? - Where is the Rails app log on ubuntu server (nginx+passenger+capistrano)? 可以使用nginx乘客logrotate rails应用程序而无需重启? - possible to logrotate rails app with nginx passenger without restart? 仅重新启动运行在承载许多乘客应用程序的VPS上的Passenger / nginx上的单个Rails应用程序 - Restart only a single Rails app running on Passenger / nginx on VPS hosting many passenger apps 如何在Ubuntu上切换生产Rails应用程序(passenger / nginx / capistrano)以使用RVM? - How can I switch a production rails app (passenger/nginx/capistrano) to use RVM on Ubuntu? Capistrano部署后,Rails应用程序(Nginx / Passenger)冻结20分钟以上 - Rails app (Nginx / Passenger) freezes up for 20+ minutes after capistrano deploy Rails Passenger / Capistrano / ubuntu应用不提供资产 - Rails Passenger/Capistrano/ubuntu App not serving assets Passenger + Capistrano + Apache = Rails应用程序未运行 - Passenger + Capistrano + Apache = Rails app not running
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM