How do I deploy a rails app to more than one domain/user/db combination in Capistrano and Rails 3? -


this might sound strange (or dangerous) deploy 1 rails app multiple domains. built 1 cms maintain several different clients. difference between sites css files, images, database.yml, , config.yml file. when deploy update sites @ once. each domain uses different usernames , passwords cannot use single user normal set in deploy.rb file. need run deploy on different sets of users, domains, , databases.

my needs different deploying several staging, test, or load balanced servers. each web server unique , independent production server, running though different rails app.

i need following in deploy.rb:

role :app, "www.cats.com", "www.dogs.com" role :web, "www.cats.com", "www.dogs.com" role :db, "www.cats.com", "www.dogs.com" # both need same migrations  set :deploy_to  "/home/#{cats_user}/www.cats.com",  "/home/#{dogs_user}/www.dogs.com" 

is possible? if not, alternative appreciated!

we use multistaging option of capistrano-ext described in this article.

the example in blogpost different stages in releasing (testing, acceptance, production) use deploy different servers. , each stage has own configuration-file can change configuration (config.yml/database.yml) per stage.

if have more questions, ask :)


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -