[Mongrel] Running multiple domains on one codebase, mongrel a good choice?

Luis Lavena luislavena at gmail.com
Wed Sep 6 21:40:41 EDT 2006

On 9/6/06, John Clayton <john at fivesquaresoftware.com> wrote:
> We're working on rails application for a client that needs to be
> deployed under a variety of domain names and needs the ability to
> load custom configurations for the database, parts of the docroot,
> caching, etc. based on the site we're serving.  We use mongrel to
> host some other single domain apps and would like to do so here too.
> We'd like to not have to deploy the codebase multiple times either
> (since it's identical) so we're trying to figure out a way maybe to
> load each instance into mongrel with different params and then let
> the instance configure itself.

If your application is equal (or at least, only database and public/
configuration differ) you should check Fossilize plugin.

Its too "crude", but John W. Long (Radiant CMS) implemented it in a
better way to suit "instancing" based on gems or folders where you
store the main code base and redirect to instances.

> Does anyone have experience using mongrel in this way or similar?

Also, mongrel works good under this scenario. You should check the
sample code and the docs about creating daemons for mongrel_cluster
that load your specific root path.

> Thanks,
> John
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

More information about the Mongrel-users mailing list