Forum: Ruby on Rails Deployment question: running multiple applications using sym

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B9a732fc30c32098347a0177c75ee27b?d=identicon&s=25 Jeroen Houben (Guest)
on 2006-02-21 16:27
(Received via mailing list)
Hi,

I'm looking to run several installation of a rails app. Each one has
certain unique elements, like database.yml some and some css stuff,
possible some templates as well.

I've set this up like

/w/sites/clienta
/w/sites/clientb
/w/sites/clientc

Inside these directories there will be mostly symlinks to:

/apps/myapp

Urls for these apps will be:

http://clienta.example.com
http://clientb.example.com
http://clientc.example.com

Is it best to have each installation have it's own public/dispatch.fcgi
? Or should I symlink them to /apps/myapp/public/dispatch.fcgi?
If I give them their own socket it shouldn't matter and I can just
symlink them, right?

Also, what is the preferred way to setup lighty? I've got this so far,
and it's working, only switchtower can never find any running processes
so the rake deploy doesn't fully work because I still have to restart
the server manually...

$HTTP["host"] == var.appname {
    server.document-root = "/w/sites/" + var.appname + "/public/"
    url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
    server.error-handler-404 = "/dispatch.fcgi"
    fastcgi.server = ( ".fcgi" =>
          ( "localhost" =>
             ( "min-procs" => 1,
               "max-procs" => 4,
               "socket" => "/tmp/" + var.appname + ".socket",
               "bin-path" => "/w/sites/" + var.appname +
"/public/dispatch.fcgi",
               "bin-environment" => ( "RAILS_ENV" => "production" )
             )
          )
       )
}



Can anybody comment on this setup?

Jeroen
This topic is locked and can not be replied to.