The :db role is used for only one thing: to indicate the server where schema migrations should be run. If you do not have shell access to your actual database server, just configure one of your app servers to fill the db role:
role :web, "web-01" role :app, "web-01" role :db, "web-01", :primary => true (Be sure to add the :primary => true bit, too, otherwise the migrate task won't work. This is so that you can define multiple slaves as the :db role as well, but only have migrations run against the primary master.) - Jamis On Jun 23, 2007, at 10:56 AM, me wrote: > > Hello, > > For what purpose is role :db used? > > My web app is hosted on a server called "web-01" and the database it > uses is on server "services-01". So, I edited my deploy.rb as: > > role :web, "web-01" > role :app, "web-01" > role :db, "services-01" > > But when I ran `cap setup`, I got an authentication error when it > listed: > servers: ["services-01", "web-01"] > and asked me to enter a password, to which I entered my password to > web-01. (I do not have shell access to services-01.) > > When I changed role :db to "web-01", setup ran without a hitch. And > just for fun, I changed :db to point to a db server that I do have > access to, and I saw it attempt to mkdir files in web-01 as if my > rails app will reside there. > > So, exactly, what is the purpose of :db? > > -A. > > > > --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
