nginx rails passenger mass deployment actually.
I typically deploys several applications that do not have much load on one machine. I use the advanced nginx virtual host technic(see Wildcard Subdomains in a Parent Folder).
I was rather surprised to see the article "new Passenger 3", especially in the aspect of mass deployment. Feature that since I have tested, works in nginx and Passenger series (do not know from which version).
The part of the nginx configuration that makes this possible is this:
http {
# [...]
passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15;
passenger_ruby /usr/local/bin/ruby;
server {
listen 0.0.0.0:80;
root /var/www/servers/$host/public;
access_log /var/log/nginx/servers.access.log;
error_log /var/log/nginx/servers.error.log;
location / {
index index.html index.php;
passenger_enabled on;
autoindex on;
}
}
# [...]
}
As soon as dir structure is as says on the documentation of Passenger (config.ru /tmp and /public) appears an application on the specific domain.
So if you want to deploy a new app, just put the files on the server.
ExtraBoll, for capistrano style deploys:
http {
...
server {
...
root /var/www/servers/$host/current/public;
}
}
1, jul | sin comentarios cientifico compártelo Tags: ruby, rails, passenger, deploy, nginx, conf

Escribe un comentario