Capistrano 通过 :app、:web、:db 主计算机连接到第二个服务器
我正在尝试使 capistrano 连接到第二台服务器,而不是通过“角色”定义定义的服务器,以便连接到一台特定服务器,在其上运行 mysqldump,并将新转储 scp 到 :app,:web主持人。
所以这就是我写的:
server "staging.app.com", :app, :web, :db, :primary => true
server "legacyserver.com", :origin_server
我希望仅在需要时连接到 :origin_server ,即当我需要运行 mysqldump 和 scp 时。但是,当启动 cap%env%deploy 时,capistrano 会记录 :
servers: ["staging.app.com", "legacyserver.com"]
并尝试使用相同的输入凭据登录到两台计算机。
我可能会缺少什么?谢谢。
I'm trying to make capistrano connect to a second server than the ones defined throught the 'role' definitions, in order to connect to one specific server, run a mysqldump on it, and scp the fresh dump to the :app,:web host.
So here's what I wrote :
server "staging.app.com", :app, :web, :db, :primary => true
server "legacyserver.com", :origin_server
I wish to connect to :origin_server only when needed, i.e when I need to run mysqldump and scp of it. But, when launching cap %env% deploy, capistrano logs :
servers: ["staging.app.com", "legacyserver.com"]
and tries to log to both machines using the same entered credentials.
What could I be missing ? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将 :orinal _server 设置为非发布服务器。为此,您需要添加以下内容:
现在,如果有明确说明,任务将仅在此服务器上运行。
You can set the :orginal _server to be a non release server. To do this you need to add this:
Now tasks will only be run on this server if specifically stated.