Capistrano部署到同一服务器上的不同路径 [英] Capistrano deploy to different path on same server
本文介绍了Capistrano部署到同一服务器上的不同路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用capistrano部署我的应用程序。但是我想将应用程序部署到同一服务器的多个路径。例如,如果是第一次运行,我想将其部署到以下路径
I am trying to deploy my application using capistrano. But I want to deploy my application to multiple paths of the same server.For example If for the first run I want to deploy it to below path
set :deploy_to, '/home/a/some_path/
一旦完成第一个它应该在第二条路径上运行
Once completed the first one it should run for the second path that will be
set :deploy_to, '/home/b/some_path/
等。有什么建议可以实现吗?现在我的单路径部署路径正在运行。
and so on. Any suggestions how can I achieve this? Right now my single path deployment path is working AOK.
推荐答案
在您的配置文件中:
set :deploy_to, ENV["DEPLOY_PATH"]
然后,要进行部署,请运行设置 DEPLOY_PATH
变量的命令:
Then, to deploy, run the command setting the DEPLOY_PATH
variable:
DEPLOY_PATH="my/path" cap production deploy
这篇关于Capistrano部署到同一服务器上的不同路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文