一起部署多个应用

一起部署多个应用

本文介绍了一起部署多个应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个配置为使用capistrano进行部署的应用程序,它们都可以单独部署,但是我想发布需要将两个应用程序一起部署的版本。

I have two apps configured to deploy using capistrano and they both deploy fine individually, but I would like to make releases where both apps need to be deployed together.

如果有解决方案可以同时部署多个capistrano并选择分支机构?

If there a solution out there to deploy multiple capistrano deploys together and select branches?

我尝试过caphub,但对我来说不起作用,我明白了:

I've tried caphub but it's not working for me, I get this:

cap aborted!
NoMethodError: undefined method `gsub' for #<Proc:0x007f870bf5a8e0>

我可以使用bash脚本来部署所有脚本,但是还有什么更好的方法吗?

I could have a bash script to deploy all, but is there something better?

推荐答案

尝试查看。

基本上,您选择1个主存储库,其余的作为子模块,这样Capistrano仅从一个git存储库中提取=原子部署。

Basically you choose 1 main repo and have the rest as submodules, this way Capistrano only pulls from one git repo = atomic deploy.

它实际上不会合并存储库,每个存储库都会像以前一样拥有自己的提交历史记录。

子模块的代码将出现在主模块的根文件夹下。

It won't actually merge the repos, each one will have its own commit history as before.
Submodules' code will appear under main module's root folder.

因此,如果所有应用程序都位于同一服务器上,那么这可能是一个很好的解决方案。

So if all your apps are to be on the same server, this could be a good solution.

这篇关于一起部署多个应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 15:09