{"id":1247,"date":"2024-08-08T21:57:20","date_gmt":"2024-08-08T12:57:20","guid":{"rendered":"https:\/\/shinke1987.net\/?p=1247"},"modified":"2024-08-08T21:57:20","modified_gmt":"2024-08-08T12:57:20","slug":"gaephp%e3%81%a7dispatch-yaml%e3%81%a7%e3%83%ab%e3%83%bc%e3%83%86%e3%82%a3%e3%83%b3%e3%82%b0%e3%81%ae%e5%8b%95%e4%bd%9c%e7%a2%ba%e8%aa%8d","status":"publish","type":"post","link":"https:\/\/shinke1987.net\/?p=1247","title":{"rendered":"GAE(PHP)\u3067dispatch.yaml\u3067\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u52d5\u4f5c\u78ba\u8a8d"},"content":{"rendered":"\n<h2 id=\"toc0\" class=\"wp-block-heading\">\u524d\u63d0<\/h2>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u7528\u30b5\u30fc\u30d0\u307e\u3067\u69cb\u7bc9\u6e08\u307f\u3002<br>\uff08\u305f\u3060\u3057\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u52d5\u4f5c\u78ba\u8a8d\u306f\u5b9f\u969b\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3044\u3068\u78ba\u8a8d\u3067\u304d\u306a\u3044\uff09<\/p>\n\n\n\n<p>\u30ed\u30fc\u30ab\u30eb\u74b0\u5883 \u2192 OS\uff1amacOS 14.5 sonoma<\/p>\n\n\n\n<h2 id=\"toc1\" class=\"wp-block-heading\">\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210<\/h2>\n\n\n\n<p>\u4e0b\u8a18\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3067\u884c\u3046\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nroot\n\u251c app.yaml\n\u251c dispatch.yaml\n\u251c index.php\n\u251c service1\n\u2502 \u251c service1.yaml\n\u2502 \u2514 index.php\n\u2514 service2\n\u3000 \u251c service2.yaml\n\u3000 \u2514 index.php\n<\/pre><\/div>\n\n\n<h2 id=\"toc2\" class=\"wp-block-heading\">app.yaml \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nruntime: php82\nenv: standard\ninstance_class: F1\nautomatic_scaling:\n  max_instances: 1\n  max_idle_instances: 1\nservice_account: gae-test-431804@appspot.gserviceaccount.com\n<\/pre><\/div>\n\n\n<h2 id=\"toc3\" class=\"wp-block-heading\">service1.yaml \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nruntime: php82\nenv: standard\ninstance_class: F1\nautomatic_scaling:\n  max_instances: 1\n  max_idle_instances: 1\nservice_account: gae-test-431804@appspot.gserviceaccount.com\nservice: service1\n<\/pre><\/div>\n\n\n<h2 id=\"toc4\" class=\"wp-block-heading\">service2.yaml \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\nruntime: php82\nenv: standard\ninstance_class: F1\nautomatic_scaling:\n  max_instances: 1\n  max_idle_instances: 1\nservice_account: gae-test-431804@appspot.gserviceaccount.com\nservice: service2\n<\/pre><\/div>\n\n\n<h2 id=\"toc5\" class=\"wp-block-heading\">dispatch.yaml \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\ndispatch:\n  - url: &quot;*\/&quot;\n    service: default\n  - url: &quot;*\/service1\/*&quot;\n    service: service1\n  - url: &quot;*\/service2\/*&quot;\n    service: service2\n<\/pre><\/div>\n\n\n<h2 id=\"toc6\" class=\"wp-block-heading\">root\/index.php \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\necho &lt;&lt;&lt;EOF\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;default&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    default\n  &lt;\/body&gt;\n&lt;\/html&gt;\nEOF;\n<\/pre><\/div>\n\n\n<h2 id=\"toc7\" class=\"wp-block-heading\">root\/service1\/index.php \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\necho &lt;&lt;&lt;EOF\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;service1&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    service1\n  &lt;\/body&gt;\n&lt;\/html&gt;\nEOF;\n<\/pre><\/div>\n\n\n<h2 id=\"toc8\" class=\"wp-block-heading\">root\/service2\/index.php \u306e\u5185\u5bb9<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; notranslate\" title=\"\">\n&lt;?php\n\necho &lt;&lt;&lt;EOF\n&lt;html&gt;\n  &lt;head&gt;\n    &lt;title&gt;service2&lt;\/title&gt;\n  &lt;\/head&gt;\n  &lt;body&gt;\n    service2\n  &lt;\/body&gt;\n&lt;\/html&gt;\nEOF;\n<\/pre><\/div>\n\n\n<h2 id=\"toc9\" class=\"wp-block-heading\">\u30c7\u30d7\u30ed\u30a4<\/h2>\n\n\n\n<p>\u958b\u767a\u7528\u30b5\u30fc\u30d0\u3067\u52d5\u4f5c\u78ba\u8a8d\u3067\u304d\u308c\u3070\u826f\u3044\u304c\u3001\u624b\u9806\u304c\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u5b9f\u969b\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u3066\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n\n\n\n<h3 id=\"toc10\" class=\"wp-block-heading\">default\u3092\u542b\u30803\u3064\u306e\u30b5\u30fc\u30d3\u30b9\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b<\/h3>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n% gcloud app deploy\n% gcloud app deploy service1\/service1.yaml service2\/service.yaml\n<\/pre><\/div>\n\n\n<p>service1 \u3068 service2 \u3092\u30c7\u30d7\u30ed\u30a4\u3057\u305f\u6642\u306e\u30ed\u30b0\u306f\u4e0b\u8a18\u306e\u901a\u308a\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nServices to deploy:\n\ndescriptor:                  &#x5B;\/Users\/Mac\u306e\u30e6\u30fc\u30b6\u540d\/Development\/GoogleAppEngine\/GAE-Test\/service1\/service1.yaml]\nsource:                      &#x5B;\/Users\/Mac\u306e\u30e6\u30fc\u30b6\u540d\/Development\/GoogleAppEngine\/GAE-Test\/service1]\ntarget project:              &#x5B;gae-test-431804]\ntarget service:              &#x5B;service1]\ntarget version:              &#x5B;20240808t173059]\ntarget url:                  &#x5B;service1\u306eURL]\ntarget service account:      &#x5B;gae-test-431804@appspot.gserviceaccount.com]\n\n\ndescriptor:                  &#x5B;\/Users\/Mac\u306e\u30e6\u30fc\u30b6\u540d\/Development\/GoogleAppEngine\/GAE-Test\/service2\/service2.yaml]\nsource:                      &#x5B;\/Users\/Mac\u306e\u30e6\u30fc\u30b6\u540d\/Development\/GoogleAppEngine\/GAE-Test\/service2]\ntarget project:              &#x5B;gae-test-431804]\ntarget service:              &#x5B;service2]\ntarget version:              &#x5B;20240808t173059]\ntarget url:                  &#x5B;service2\u306eURL]\ntarget service account:      &#x5B;gae-test-431804@appspot.gserviceaccount.com]\n\n\nDo you want to continue (Y\/n)?  Y\n\nBeginning deployment of service &#x5B;service1]...\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n\u2560\u2550 Uploading 0 files to Google Cloud Storage                \u2550\u2563\n\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\nFile upload done.\nUpdating service &#x5B;service1]...done.        \nSetting traffic split for service &#x5B;service1]...done.\nDeployed service &#x5B;service1] to &#x5B;service1\u306eURL]\nBeginning deployment of service &#x5B;service2]...\nCreated .gcloudignore file. See `gcloud topic gcloudignore` for details.\n\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n\u2560\u2550 Uploading 0 files to Google Cloud Storage                \u2550\u2563\n\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\nFile upload done.\nUpdating service &#x5B;service2]...done.                    \nSetting traffic split for service &#x5B;service2]...done.\nDeployed service &#x5B;service2] to &#x5B;service2\u306eURL]\n\nYou can stream logs from the command line by running:\n  $ gcloud app logs tail -s &amp;lt;service&gt;\n\nTo view your application in the web browser run:\n  $ gcloud app browse -s &amp;lt;service&gt;\n<\/pre><\/div>\n\n\n<p>\u3053\u306e\u6642\u70b9\u3067\u4e0b\u8a18URL\u306b\u5bfe\u3057\u3066\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"http:\/\/xn--gaeurl-de4e\/\">http:\/\/GAE\u306eURL\/<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/service1.xn--gaeurl-de4e\/\">http:\/\/service1.GAE\u306eURL\/<\/a><\/li>\n\n\n\n<li><a href=\"http:\/\/service2.xn--gaeurl-de4e\/\">http:\/\/service2.GAE\u306eURL\/<\/a><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>\u305f\u3060\u3057\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30b5\u30fc\u30d3\u30b9\u306e\u6570\u3060\u3051\u7acb\u3061\u4e0a\u304c\u308b\u306e\u3067\u6ce8\u610f\u3002<\/p>\n\n\n\n<h3 id=\"toc11\" class=\"wp-block-heading\">dispatch.yaml \u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308b<\/h3>\n\n\n\n<p>\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n% gcloud app deploy dispatch.yaml\n<\/pre><\/div>\n\n\n<h2 id=\"toc12\" class=\"wp-block-heading\">\u52d5\u4f5c\u78ba\u8a8d<\/h2>\n\n\n\n<p>\u4e0b\u8a18URL\u3092Web\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u3044\u3066\u78ba\u8a8d\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>default\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/<\/li>\n\n\n\n<li>default\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service1<\/li>\n\n\n\n<li>default\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service2<\/li>\n\n\n\n<li>service1\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service1\/<\/li>\n\n\n\n<li>service1\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service1\/abc<\/li>\n\n\n\n<li>service2\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service2\/<\/li>\n\n\n\n<li>service2\u30b5\u30fc\u30d3\u30b9\uff1ahttp:\/\/GAE\u306eURL\/service2\/abc<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u524a\u9664\u3059\u308b\u306b\u306f\u3001\u4e0b\u8a181\u884c\u306edispatch.yaml\u3092\u30c7\u30d7\u30ed\u30a4\u3059\u308c\u3070\u826f\u3044\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: yaml; title: ; notranslate\" title=\"\">\ndispatch: &#x5B;]\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"<p>\u524d\u63d0 \u30ed\u30fc\u30ab\u30eb\u958b\u767a\u7528\u30b5\u30fc\u30d0\u307e\u3067\u69cb\u7bc9\u6e08\u307f\u3002\uff08\u305f\u3060\u3057\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306e\u52d5\u4f5c\u78ba\u8a8d\u306f\u5b9f\u969b\u306b\u30c7\u30d7\u30ed\u30a4\u3057\u306a\u3044\u3068\u78ba\u8a8d\u3067\u304d\u306a\u3044\uff09 \u30ed\u30fc\u30ab\u30eb\u74b0\u5883 \u2192 OS\uff1amacOS 14.5 sonoma \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210 \u4e0b\u8a18\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u69cb\u6210\u3067\u884c\u3046\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118,80],"tags":[119],"class_list":["post-1247","post","type-post","status-publish","format-standard","hentry","category-gcp","category-php","tag-gae"],"_links":{"self":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1247"}],"version-history":[{"count":5,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1247\/revisions"}],"predecessor-version":[{"id":1252,"href":"https:\/\/shinke1987.net\/index.php?rest_route=\/wp\/v2\/posts\/1247\/revisions\/1252"}],"wp:attachment":[{"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shinke1987.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}