{"id":406,"date":"2017-12-21T05:28:22","date_gmt":"2017-12-20T20:28:22","guid":{"rendered":"https:\/\/t-office.blue\/?p=406"},"modified":"2017-12-21T05:29:35","modified_gmt":"2017-12-20T20:29:35","slug":"laravel%e5%ad%a6%e7%bf%92laravel-envoy%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6%e3%83%87%e3%83%97%e3%83%ad%e3%82%a4%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96%e3%81%97%e3%81%a6%e3%81%bf%e3%82%88%e3%81%86part6","status":"publish","type":"post","link":"https:\/\/wp.t-office.blue\/?p=406","title":{"rendered":"[Laravel\u5b66\u7fd2]laravel\/envoy\u3092\u4f7f\u3063\u3066\u30c7\u30d7\u30ed\u30a4\u3092\u81ea\u52d5\u5316\u3057\u3066\u307f\u3088\u3046(Part6)"},"content":{"rendered":"<p>[Laravel\u5b66\u7fd2]laravel\/envoy\u3092\u4f7f\u3063\u3066\u30c7\u30d7\u30ed\u30a4\u3092\u81ea\u52d5\u5316\u3057\u3066\u307f\u3088\u3046(Part6)<\/p>\n<p>\u624b\u52d5\u3067\u30c7\u30d7\u30ed\u30a4\uff08\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\uff06\u8a2d\u5b9a\uff09\u3059\u308b\u3068\u3001\u4f5c\u696d\u5fd8\u308c\u3068\u304b\u304c\u8d77\u3053\u3063\u3066\u8272\u3005\u3068\u5fc3\u914d\u3002\u30c7\u30d7\u30ed\u30a4\u30c4\u30fc\u30eb\u3067\u30b3\u30de\u30f3\u30c9\u4e00\u3064\u3067\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u305f\u3089\u3070\u3001\u554f\u984c\u304c\u3042\u3063\u305f\u3068\u304d\u306b\u305d\u3053\u3092\u4fee\u6b63\u3059\u308c\u3070\u5b89\u5b9a\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u3001laravel\u7528\u306e\u30c7\u30d7\u30ed\u30a4\u30c4\u30fc\u30eb\u304c\u3042\u308b\u306e\u3067\u304a\u624b\u8efd\u3089\u3057\u3044\u304b\u3089\u3001\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3002<\/p>\n<script type=\"text\/javascript\">document.write(\"<div data-role=\\\"amazonjs\\\" data-asin=\\\"4798052582\\\" data-locale=\\\"JP\\\" data-tmpl=\\\"Small\\\" data-img-size=\\\"\\\" class=\\\"asin_4798052582_JP_Small amazonjs_item\\\"><div class=\\\"amazonjs_indicator\\\"><span class=\\\"amazonjs_indicator_img\\\"><\/span><a class=\\\"amazonjs_indicator_title\\\" href=\\\"#\\\">PHP\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af Laravel\u5165\u9580<\/a><span class=\\\"amazonjs_indicator_footer\\\"><\/span><\/div><\/div>\")<\/script><noscript><iframe src=\"https:\/\/rcm-jp.amazon.co.jp\/e\/cm?t=ensuicom-22&o=9&p=8&l=as1&asins=4798052582&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/noscript>\n<p>[\u76ee\u6b21]<\/p>\n<ul>\n<li>laravel\/envoy\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/li>\n<li>\u8a2d\u5b9a<\/li>\n<li>\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u307f\u305f<\/li>\n<\/ul>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"fluid\"\n     data-ad-layout-key=\"-ei+6a+g-c3+k8\"\n     data-ad-client=\"ca-pub-4003048870046052\"\n     data-ad-slot=\"1589408991\"><\/ins><\/p>\n<p><script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h2>laravel\/envoy\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>\u307e\u305a\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre>\n$ composer global require \"laravel\/envoy\"\n\nChanged current directory to \/Users\/\u3007\u3007\/.composer\nUsing version ^1.3 for laravel\/envoy\n.\/composer.json has been updated\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nPackage operations: 9 installs, 0 updates, 0 removals\n  - Installing nategood\/httpful (0.2.20): Downloading (100%)\n  - Installing symfony\/translation (v3.4.2): Downloading (100%)\n  - Installing nesbot\/carbon (1.22.1): Loading from cache\n  - Installing psr\/simple-cache (1.0.0): Loading from cache\n  - Installing psr\/container (1.0.0): Loading from cache\n  - Installing illuminate\/contracts (v5.5.17): Downloading (100%)\n  - Installing doctrine\/inflector (v1.2.0): Loading from cache\n  - Installing illuminate\/support (v5.5.17): Downloading (100%)\n  - Installing laravel\/envoy (v1.3.4): Downloading (100%)\nsymfony\/translation suggests installing symfony\/config ()\nsymfony\/translation suggests installing symfony\/yaml ()\nilluminate\/support suggests installing illuminate\/filesystem (Required to use the composer class (5.2.*).)\nilluminate\/support suggests installing symfony\/var-dumper (Required to use the dd function (~3.3).)\nWriting lock file\nGenerating autoload files\n<\/pre>\n<p>global\u3092\u3064\u3051\u3066\u308b\u304b\u3089\u30e6\u30fc\u30b6\u306e\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u308b\u306e\u304b\u306a\uff1f\uff08\u3042\u3093\u307e\u308a\u308f\u304b\u3063\u3066\u306a\u3044\uff09<br \/>\n\u3055\u3089\u306b\u3001composer.json\u306b\u66f8\u3044\u3066composer update\u3057\u305f\u3089\u3042\u304b\u3093\u306e\u304b\u306a\uff1f\uff08\u3068\u308a\u3042\u3048\u305a\u7f6e\u3044\u3068\u3044\u3066\u3001\u5c06\u6765\u7684\u306b\u308f\u304b\u308c\u3070\u53c8\u8a18\u8f09\u3057\u3088\u3046\uff08\u6c57\uff09\uff09<\/p>\n<p>\u3067\u8aad\u3093\u3067\u308b\u3068 <code>composer global require \"laravel\/envoy\"<\/code> \u3092\u3057\u305f\u3042\u3068\u306f  <code>composer global update<\/code>\u3092\u3057\u308d\u3068\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u3084\u3063\u3068\u304f\u3002<\/p>\n<pre>\n$ composer global update\nChanged current directory to \/Users\/tacky2k\/.composer\nLoading composer repositories with package information\nUpdating dependencies (including require-dev)\nPackage operations: 0 installs, 5 updates, 0 removals\n  - Updating symfony\/process (v3.4.0 => v3.4.2): Downloading (100%)\n  - Updating symfony\/filesystem (v3.4.0 => v4.0.2): Downloading (100%)\n  - Updating symfony\/debug (v4.0.0 => v4.0.2): Downloading (100%)\n  - Updating symfony\/console (v3.4.0 => v3.4.2): Downloading (100%)\n  - Updating laravel\/installer (v1.4.1 => v1.5.0): Downloading (100%)\nWriting lock file\nGenerating autoload files\n<\/pre>\n<p>\u5e7e\u3064\u304b\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30d0\u30fc\u30b8\u30e7\u30f3\u4e0a\u304c\u308b\u3051\u3069\u3060\u3044\u3058\u3087\u3046\u3076\u306a\u3093\u304b\u306a\uff1f<br \/>\n\u7279\u306blaravel\/installer\u306fv1.4.1\u304b\u3089v1.5.0\u306b\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3057\u3066\u308b\u3051\u3069\u3001\u3001\u3001\u3001<\/p>\n<h2>\u8a2d\u5b9a<\/h2>\n<p>Envoy.blade.php\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066\u8a2d\u5b9a\u3092\u66f8\u304f\u3063\u3066\u66f8\u3044\u3066\u3042\u308b\u3051\u3069\u3001\u3069\u3053\u306b\u914d\u7f6e\u3059\u308b\u306e\uff1f\u3068\u3044\u3046\u3053\u3068\u3067\u8a66\u3057\u306bresources\u306eviews\u306a\u304b\u306b\u7f6e\u3044\u3066\u5b9f\u884c\u3057\u3066\u307f\u308b\u3002<\/p>\n<pre>\n\/\/project\/resources\/views\/Envoy.blade.php\n\n@servers(['tanba-events' => ['\u30e6\u30fc\u30b6\u540d@IP\u30a2\u30c9\u30ec\u30b9']])\n\n@task('foo', ['on' => 'tanba-events'])\n    ls -la\n@endtask\n\n<\/pre>\n<p>\u8a66\u3057\u306b\u5b9f\u884c<\/p>\n<pre>\n$ envoy run deploy\n\nIn TaskContainer.php line 328:\n\n  Task \"deploy\" is not defined.\n\n\nrun [--continue] [--pretend] [--path PATH] [--] <task>\n<\/pre>\n<p>???\u3042\u3093\u307e\u308f\u304b\u3089\u3093\u3051\u3069 &#8211;help\u3068\u304blists\u3068\u304b\u3064\u3051\u3066\u898b\u308b\u3068\u3001\u3069\u3046\u3082@task\u306e\u4e2d\u306e\u6700\u521d\u306e\u5909\u6570\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b\u307f\u305f\u3044\u3060\u304b\u3089\u3001envoy run foo\u306b\u3059\u308b\u304b @task(&#8216;deploy&#8217;\u301c\u306b\u3059\u308b\u304b\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u307f\u305f\u3044\u3002<\/p>\n<pre>\n$ envoy run foo\npassword: \u30d1\u30b9\u30ef\u30fc\u30c9\n\n<\/pre>\n<p>\u3053\u308c\u3067ls -al\u306e\u5185\u5bb9\u304c\u8fd4\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u30d0\u30c3\u30c1\u30b7\uff01<br \/>\n\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u308b\u3088\u3046\u306b\u66f8\u3044\u3066\u307f\u305f<\/p>\n<pre>\n@servers(['tanba-events' => ['\u30e6\u30fc\u30b6\u540d@IP\u30a2\u30c9\u30ec\u30b9']])\n\n@setup\n  $dir = \"\/var\/www\/tanba-events\"\n@endsetup\n\n@macro('deploy')\n  composer\n  git\n  artisan\n  slack\n@endmacro\n\n@task('composer')\n  cd $dir\n  composer update -y\n  \/\/ composer install --no-dev --optimize-autoloader\n@endtask\n\n@task('git')\n  cd \/var\/www\/\n  git pull origin master\n@endtask\n\n@task('artisan')\n  cd $dir\n  php artisan down\n  php artisan migrate\n  php artisan cache:clear\n  php artisan config:cache\n  php artisan route:cache\n  php artisan view:clear\n  php artisan up\n@endtask\n\n\n<\/pre>\n<h2>\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u307f\u305f<\/h2>\n<p>\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3001\u3001\u3001\u3001<\/p>\n<pre>\n$ git config --global user.name \"\u540d\u524d\"\n$ git config --global user.email username@gmail.com\n$ git config --global push.default matching\n$ git config --global alias.co checkout\n$ git remote add origin https:\/\/tacky2k@bitbucket.org\/tacky2k\/hoge.git\n<\/pre>\n<p>laravel deproy\u306e\u4e2d\u3067\u306eartisan \u304c\u3046\u307e\u304f\u8d70\u308a\u307e\u305b\u3093\u3002\u3082\u3046\u5c11\u3057\u7814\u7a76\u3057\u3066\u3001\u3046\u307e\u304f\u3044\u304f\u65b9\u6cd5\u3092\u63a2\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u8272\u3005\u7d06\u4f59\u66f2\u6298\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u8a2d\u5b9a\u306a\u3093\u304b\u306f\u4fee\u6b63\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3046\u307e\u304f\u884c\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u53c2\u8003<br \/>\nhttps:\/\/qiita.com\/bmf_san\/items\/61e29a7c20108df64bc7<br \/>\nhttps:\/\/laravel.com\/docs\/5.5\/envoy<\/p>\n<p><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-format=\"fluid\"\n     data-ad-layout-key=\"-ei+6a+g-c3+k8\"\n     data-ad-client=\"ca-pub-4003048870046052\"\n     data-ad-slot=\"1589408991\"><\/ins><\/p>\n<p><script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Laravel\u5b66\u7fd2]laravel\/envoy\u3092\u4f7f\u3063\u3066\u30c7\u30d7\u30ed\u30a4\u3092\u81ea\u52d5\u5316\u3057\u3066\u307f\u3088\u3046(Part6) \u624b\u52d5\u3067\u30c7\u30d7\u30ed\u30a4\uff08\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\uff06\u8a2d\u5b9a\uff09\u3059\u308b\u3068\u3001\u4f5c\u696d\u5fd8\u308c\u3068\u304b\u304c\u8d77\u3053\u3063\u3066\u8272\u3005\u3068\u5fc3\u914d\u3002\u30c7\u30d7\u30ed\u30a4\u30c4\u30fc\u30eb\u3067\u30b3\u30de\u30f3\u30c9\u4e00\u3064\u3067\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u305f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[40,5],"tags":[52,51,41,53],"class_list":["post-406","post","type-post","status-publish","format-standard","hentry","category-laravel","category-5","tag-deploy","tag-envoy","tag-laravel5-5","tag-53"],"_links":{"self":[{"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/posts\/406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=406"}],"version-history":[{"count":4,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/posts\/406\/revisions"}],"predecessor-version":[{"id":409,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=\/wp\/v2\/posts\/406\/revisions\/409"}],"wp:attachment":[{"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.t-office.blue\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}