开发者

Best practices for deploying Unicorn Rails Apps (With Upstart)

开发者 https://www.devze.com 2023-02-21 03:13 出处:网络
I have a dedicated server running around 10 Rails apps using Nginx, Unico开发者_如何学运维rn and Ruby 1.9.2 etc. I also use capistrano for deployment.

I have a dedicated server running around 10 Rails apps using Nginx, Unico开发者_如何学运维rn and Ruby 1.9.2 etc. I also use capistrano for deployment.

What I'm after, is some advice regarding a best practices for running and deploying these apps.

Each app has their own home directory and user account. However, at the moment I have them setup in the sudoers file so they can restart the app upon deployment (I have capistrano configured to run a restart.sh script). This means I have to type in the user's password upon deploying (capistrano prompts me when trying to run restart.sh).

Can upstart daemons be configured to run without sudo permissions?

Is there a better way to do this?

Cheers, James


You could simply run the ROR applications as the user who is running the Capistrano deploy script, and have that user own (or have the permission to run) the restart.sh file.

0

精彩评论

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