简体   繁体   中英

Deploying a Rails Application with Puma and Nginx [without sudo]

All the how-to, tutorial and manuals I can find on nginx and Puma assume the user following them has sudo access on the server.

Is it possible to deploy an application with nginx and puma in an environment in which you do not have sudo?

Presume for the purposes of this question that working tightly with someone who does have sudo to run all the necessary commands when you request them is not an option.

You can build from source without installing it. As long as you aren't trying to use ports under 1024, you should be able to download and compile nginx yourself. I know puma can be installed as a gem, so it wouldn't need to be sudoed in there. I think the syntax once you download the tarball is:

./configure --sbin-path=~/nginx/sbin/nginx --conf-path=~/nginx/etc/nginx.conf --pid-path=~/nginx/pid/nginx.pid

make

Building Nginx from Source

Unless you do some modification to users and groups (which will require sudo) it would be very hard if not impossible to do this.

Assuming Ubuntu and init.d you need sudo to start/stop/reset the services and modify the nginx conf files.

Here is a great resource for automated deployment and easily customize-able. RailsBox.io

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM