[英]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.