Good day. I want to raise the NGINX and UNICORN server on a VPS. And I use Ubuntu 13 for this. I have already learned how to deploy these servers and even picked up a server that works with something like = (. Now I want to deploy a sane server (without a dump or garbage). I need to keep Ruby machine for queries (ie this is not the site but simply a set of scripts for JSON responses to requests for a desktop application), however, I have a couple of tiny pages that should appear when I try to access the site. There’s almost no ruby ​​code, just 1-2 requests for the number of records in the database. In principle, you can do with simple HTML if it helps increase productivity.

Actually, I had a few questions:

1) in the tutorials on server deployment it is often written that you need to create a user DEPLOYER and give him sudo rights. Then all actions are carried out on behalf of this user. Or a group is created and ownership is granted to the group. Actually, I'm interested in whether I can configure everything from the root user and then transfer ownership of the project’s folder to the deployer. If so, what files will have to be transferred or is it better to create a user and install everything from him? I tried to transfer the rights only to the folder containing the project and the startup script, but when I try to start the server from non-root, the system indicates a lack of rights. I used configs and the startup script from here Nginx installed via apt-get. 2) When creating a user, I ran into a problem: after the relog, the backspace and arrow keys and the familiar

deployer @ server $

i just see

$

what could be the problem?

3) Capistrano heme is used in many tutorials. As far as I understand, this is a gem for automatic synchronization and restarting the server after the git update. And it is needed for a seamless restart of the server. I still find it difficult to configure. Is it possible to somehow somehow seamlessly restart the server: for example, I will update the git manually and then theoretically it would only be necessary to restart unicron. Is it possible to implement a restart or is the Capistrano the best and easiest option?

4) In most tutorials we are talking about servers with a large number of sites. In my case, there will be one project on the server. If the features of server configuration for such a case? or there will be no differences just in the config there will be 1 server block?

Thank you in advance.

    1 answer 1

    I advise you to pay more attention to Capistrano. This is a much more powerful tool than you thought at first glance. The book by A. Burns & T. Copeland "Deploying Rails", which is very useful in this respect, will be a good helper for you.

    • Thanks, I'll take a look. - Riddick