And now that I've sent it twice... whoops.
role :db, :primary => true do
find_servers(:roles => :app).first.to_s
end
On Mon, Apr 28, 2008 at 3:11 PM, David Masover <[EMAIL PROTECTED]> wrote:
> Whoops, now that I think of it, that's better written like this:
>
> set role, :db, :primary => true do
> find_servers(:roles => app).first.to_s
> end
>
>
> On Mon, Apr 28, 2008 at 3:04 PM, David Masover <[EMAIL PROTECTED]> wrote:
>
> > It doesn't, unless you want to do anything to the database server
> > directly. The only thing the database server is used for in the deploy
> > scripts, I think, is running migrations -- so if you'd rather run them from
> > the app server, you could probably do something like this:
> >
> > set role, :db do
> > servers = find_servers :roles => :app
> > master = servers.first
> > ServerDefinition.new(master.to_s, master.options.merge({:primary =>
> > true))
> > end
> >
> > That will assign the "primary DB server" to the first app server.
> >
> >
> > On Mon, Apr 28, 2008 at 2:51 PM, statikuz <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > Hi - just a general question, why does Capistrano need to have ssh
> > > access to and svn available on the database server? I have two
> > > different servers, one for app/www and a separate one for the
> > > database. The database itself is already created and the tables should
> > > be set up with the migration so I'm wondering why Cap still needs to
> > > be able to get in.
> > > > > >
> > >
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---