I have an app that is composed of front-end and back-end code-bases, each in different Git repositories.
I want to deploy both components to a single server using Capistrano v3.
How can I go about making cap fetch both repositories? Since I can only specify a single URL in the config...
Thanks
Capistrano does not support this in core.
The primary way I've handled this is to have a Capistrano deployment script for each repo and deploy them separately. If they need to know where each other is, I'll use shared_dirs and symlinks to link them up. The downside of this approach is that you might have a period of time with new code on the frontend and old code on the backend or vice versa.
If this is unacceptable, you could…
…merge the repositories. If they are so closely coupled that you can't deploy them seperately, maybe they should be one codebase.
…use Git Submodules to embed one of the repositories inside the other.
…write your own Capistrano task to check out one of the repositories (error prone).
…use a different deployment tool. Capistrano isn't always the right tool for every case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With