Different repositories on Capistrano
If you're like me, and don't have your code on Github and instead of that you're using your own-in-house Git server, you probably will need this.
The problem
Local repository from network on http://git.example.com. "Remote" repository on http://git.example.com:8081 (Yeah, I know... Don't ask why :))
The solution
I use stages. Staging and production, so I've production.rb and staging.rb on my deploy folder with the following content:
# staging.rb
role :web, "X.X.X.X", "Y.Y.Y.Y"
set :repository, "http://git.example.com/#{application}"
# production.rb
role :web, "A.A.A.A", "B.B.B.B"
set :repository, "http://git.example.com:8081/#{application}"
With this example, you can setup different repository address for different stages.
Enjoy, up-vote and share.
Written by Boris Quiroz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#