Reputation: 443
I'm having a Rails app, and there is one reason that I have to deploy one app to multiple production hosts/servers.
Currently, I have to deploy one Rails app to two hosts. So, I have to do cap production deploy
twice. And I have to comment out server line one after another.
# server 'host_1', user: 'my_user', roles: %w{app}
server 'host_2', user: 'my_user', roles: %w{app}
I have config/deploy/production.rb
and config/environments/production.rb
Ruby 2.3.3
Rails 4.2.2
capistrano-rails 1.1.1
Upvotes: 0
Views: 1232
Reputation: 21
Cap is a remote multi-server automation tool. to achieve your goal, just keep both of the linens uncommented and you will be able to deploy to both servers
server 'host_1', user: 'my_user', roles: %w{app}
server 'host_2', user: 'my_user', roles: %w{app}
Upvotes: 2