[英]Restart only a single Rails app running on Passenger / nginx on VPS hosting many passenger apps
I am running multiple rails apps and a sinatra app under the same domain on a VPS using nginx and passenger. 我正在使用Nginx和Passenger在VPS的同一域下运行多个Rails应用程序和sinatra应用程序。 When I deploy code I need to restart the application process for the app that got updated.
部署代码时,我需要重新启动已更新应用程序的应用程序过程。 Right now I'm running
service nginx stop
followed by service nginx start
thereby restarting all the passenger processes. 现在,我正在运行
service nginx stop
然后运行service nginx stop
service nginx start
从而重新启动所有乘客进程。 It seems silly to have to restart nginx instead of a just the target passenger process. 不得不重启nginx而不是仅仅重启目标乘客进程似乎很愚蠢。 Is there a way to do such a thing?
有办法做这种事吗?
Here's my nginx.conf file: https://gist.github.com/srt32/8535548 . 这是我的nginx.conf文件: https ://gist.github.com/srt32/8535548 Thanks.
谢谢。
Goto the root of your Rails application and touch a tmp/restart.txt file. 转到Rails应用程序的根目录,然后触摸tmp / restart.txt文件。
touch /webapps/mycook/tmp/restart.txt
Remove restart.txt once application is restarted, not mandatory though. 重新启动应用程序后,请删除restart.txt,但这不是必需的。
Reference - http://www.modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application 参考-http: //www.modrails.com/documentation/Users%20guide%20Nginx.html#_redeploying_restarting_the_ruby_on_rails_application
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.