deployerで2台のwebサーバに反映するにはどうすれば良いでしょうか?
現在以下のようになって、1台にのみ反映できるようにできてます。
deploy.php
server('production', 'xxx.xxx.xxx.xxx') ->stage('production') ->user('hoge') ->identityFile('~/.ssh/id_rsa') ->set('deploy_path', '/var/www/hogehoge') ->pty(true);
反映
$ dep deploy production;
複数台は
server('production', 'xxx.xxx.xxx.xxx') ->stage('production') ->user('hoge') ->identityFile('~/.ssh/id_rsa') ->set('deploy_path', '/var/www/hogehoge') ->pty(true); server('production2', 'yyy.yyy.yyy.yyy') ->stage('production') ->user('hoge') ->identityFile('~/.ssh/id_rsa') ->set('deploy_path', '/var/www/hogehoge') ->pty(true);
反映
$ dep deploy production; $ dep deploy production2;
とすることで可能なのですが、2つ叩くのが通常でしょうか?
1度で叩けば複数台に反映できるようにはできませんでしょうか?
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。