Forum: Rails deployment capistrano and mongrel_cluster.yml

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.
Raul (Guest)
on 2007-03-23 17:27
(Received via mailing list)
Hey everyone!  Hope you guys are all doing good.

I was wondering how anyone here might be handling their
mongrel_cluster.yml file with capistrano on multiple environments.  I
have my team, 3 of us with our own local development environment, a test
webserver with nginx/5mongrels and a pack of live servers with
nginx/12mongrels each.  I haven't finished my capistrano recipe yet but
it looks to me like when I deploy it's going to overwrite all my
mongrel_cluster.yml files on every machine, both test and production,
with the same file.  That would make things screwy.  I want all the
production servers to get the same yml file but the test one should be
different.

Thoughts?

Raul
Philip H. (Guest)
on 2007-03-23 18:59
(Received via mailing list)
> production servers to get the same yml file but the test one should be
> different.
>
> Thoughts?

You could do something like this...

desc "Link in the production database.yml"
task :after_update_code, :roles => :app do
   run "cp #{release_path}/config/database.yml-production
#{release_path}/config/database.yml"
end

Just alter the filenames to match your mongrel.yml's instead of
database.yml's...

-philip
Mike Sax (Guest)
on 2007-03-23 19:04
(Received via mailing list)
Hi Raul,

If you run:
    svn propset svn:ignore mongrel_cluster.yml

Then mongrel_cluster.yml will no longer be checked in/out.

- Mike
Raul (Guest)
on 2007-03-23 19:25
(Received via mailing list)
OK that's a great suggestion.  Funny thing is, it seems simple in
retrospect!  haha

Raul


----- Original Message -----
From: "Mike Sax" <removed_email_address@domain.invalid>
To: <removed_email_address@domain.invalid>
Sent: Friday, March 23, 2007 10:04 AM
Subject: [Rails-deploy] Re: capistrano and mongrel_cluster.yml
Philip H. (Guest)
on 2007-03-23 23:22
(Received via mailing list)
>>
>> If you run:
>>    svn propset svn:ignore mongrel_cluster.yml
>>
>> Then mongrel_cluster.yml will no longer be checked in/out.

Just be sure you setup an after_deploy task to write it out from a
tracked
copy otherwise you'll lose it the first time you deploy and wonder why
you're site won't work...

How do I know this?  Uh... heh. :)
This topic is locked and can not be replied to.