Last Updated: February 25, 2016
· boris
Beer avatar

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 "Remote" repository on (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, "{application}"
# production.rb
role :web, "A.A.A.A", "B.B.B.B"
set :repository, "{application}"

With this example, you can setup different repository address for different stages.

Enjoy, up-vote and share.

Say Thanks