开发者

Capistrano + NGINX Passenger Restart Rails App

开发者 https://www.devze.com 2023-01-20 14:07 出处:网络
I\'ve finally gotten capistrano to work on my website, however, I cannot seem to get the restart part of the application to work. What I want todo is setup capistrano to restart the mongrel cluster th

I've finally gotten capistrano to work on my website, however, I cannot seem to get the restart part of the application to work. What I want todo is setup capistrano to restart the mongrel cluster that is running the rails app after a deploy has gone through. 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 tha开发者_StackOverflow中文版t 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.


I think adding this task to your deploy.rb file should do

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

0

精彩评论

暂无评论...
验证码 换一张
取 消