I have the production and staging site on two different server ips. But the
database, another server ip, is the same database used by both production
and staging. When i set up the capistrano deploy task for both the
production and staging, should I keep the db role in deploy.rb like this:

deploy.rb

role :db, "database_ip", :primary => true


production.rb

role :web, "production_ip"
role :app, "production_ip"

staging.rb

role :web, "staging_ip"
role :app, "staging_ip"

Or should I do it this way:

production.rb

role :web, "production_ip"
role :app, "production_ip"

role :db, "database_ip", :primary => true


staging.rb

role :web, "production_ip"
role :app, "production_ip"

role :db, "database_ip", :primary => true


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f4494c9d-b537-4e7e-b92f-b50f56520870%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Frederick Cheung at May 1, 2014 at 5:21 pm

    On Thursday, May 1, 2014 7:50:36 AM UTC+1, John Merlino wrote:
    I have the production and staging site on two different server ips. But
    the database, another server ip, is the same database used by both
    production and staging. When i set up the capistrano deploy task for both
    the production and staging, should I keep the db role in deploy.rb like
    this:
    You could either. It might be easier to understand though if all the hosts
    for a given stage are in the same file.

    However, the :db role doesn't actually mean the database server itself - it
    means where should migrations be run from.

    Fred


    deploy.rb

    role :db, "database_ip", :primary => true


    production.rb

    role :web, "production_ip"
    role :app, "production_ip"

    staging.rb

    role :web, "staging_ip"
    role :app, "staging_ip"

    Or should I do it this way:

    production.rb

    role :web, "production_ip"
    role :app, "production_ip"

    role :db, "database_ip", :primary => true


    staging.rb

    role :web, "production_ip"
    role :app, "production_ip"

    role :db, "database_ip", :primary => true

    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/f3dc8e3e-05f9-42d0-b551-3de04098052d%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMay 1, '14 at 6:50a
activeMay 1, '14 at 5:21p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Anonymous: 1 post Frederick Cheung: 1 post

People

Translate

site design / logo © 2021 Grokbase