When ever you deploy a new rails app with an Apache/Mongrel_Cluster
setup, you have to setup a bunch of configuration files, symlink those
to the right places so apache and mongrel cluster pick them up, restart
those, figure out why it didn’t work the first time, and on and on.
What you can’t do is just drop some files into a directory and expect
your site to start working… Maybe Litespeed lets you do this, who
knows…
Here’s an idea for an automatic rails deployment system, lets
hypothetically call it dog_walker (get it? mongrel?! har har…):
It would consist daemon process that monitors a rails “apps” directory.
If a new sub-directory comes into existance and has the appropriate
config file, say app_name/config/dog_walker.yml, it picks it up,
assigns it one or more ports to run mongrels, and starts them up. It
also modifies and reloads Apache (or lighttpd/nginx, whatever the
front-end proxy is) with a new virtual host, and bam, your site is up!
Each site’s dog_walker.yml could look something like:
environment: production
nbr_mongrels: 3
server_name: www.mysweetrailsapp.com
dog_walker itself would probably also need one main config file,
something like:
apps_dir: /home/username/rails_apps
proxy_server: apache
apache_conf_dir: /etc/httpd/conf.d
port_range_start: 3500
port_range_end: 4000
dog_walker could manage for you which ports get assigned to which apps
and all that junk, and create the appropriate .conf files for apache,
and then restart/reload it so it starts serving your app.
just an idea at the moment…
–
Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
Web - http://www.ElectroInteractive.com
Blog - http://synthesis.sbecker.net