{"id":379,"date":"2023-03-29T19:10:10","date_gmt":"2023-03-29T10:10:10","guid":{"rendered":"https:\/\/software.satoshis.jp\/?p=379"},"modified":"2023-04-11T14:13:59","modified_gmt":"2023-04-11T05:13:59","slug":"gae%e3%81%a7laravel%e3%82%92%e5%8b%95%e3%81%8b%e3%81%99%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/software.satoshis.jp\/?p=379","title":{"rendered":"GAE\u3067Laravel\u3092\u52d5\u304b\u3059\u65b9\u6cd5"},"content":{"rendered":"<p>GAE(Google Apps Engine)\u3067Laravel\u304c\u52d5\u304f\u3089\u3057\u3044\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h3>Laravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>\u307e\u305a\u306f\u666e\u901a\u306bLaravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% composer create-project &quot;laravel\/laravel=9&quot; hoge\r\n<\/pre>\n<p>\u6700\u521d\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u305b\u305a\u306b\u4f5c\u3063\u3066\u307f\u305f\u306e\u3067\u3059\u304c\u3001Laravel10\u3067\u306f\u52d5\u304b\u306a\u304b\u3063\u305f\u306e\u3067\u3001Laravel9\u3067\u4f5c\u308a\u76f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% composer require google\/cloud\r\n<\/pre>\n<h3>GAE\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u95a2\u3059\u308b\u4fee\u6b63<\/h3>\n<p>GAE\u3067\u306f\u30d5\u30a1\u30a4\u30eb\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u306a\u30d1\u30b9\u304c \/tmp \u306e\u307f\u306a\u306e\u3067\u3001\u305d\u306e\u8fba\u306e\u6307\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n<p>app.yml\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nruntime: php81\r\n\r\nenv_variables:\r\n    APP_KEY: (.env\u306eAPP_KEY\u306e\u5185\u5bb9)\r\n    APP_STORAGE: \/tmp\r\n    VIEW_COMPILED_PATH: \/tmp\r\n    SESSION_DRIVER: cookie\r\n<\/pre>\n<p>bootstrap\/app.php \u306e\u3000return $app; \u306e\u524d\u306b\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$app-&gt;useStoragePath(env(&#039;APP_STORAGE&#039;, base_path() . &#039;\/storage&#039;));\r\n\r\nreturn $app;\r\n<\/pre>\n<h3>\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p>\u30ed\u30fc\u30ab\u30eb\u3067\u52d5\u304b\u3057\u3066\u307f\u3066\u3001\u52d5\u4f5c\u3059\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<h3>gcloud CLI\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u6b21\u306fgcloud CLI\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\n\u4ee5\u4e0b\u306e\u30da\u30fc\u30b8\u3092\u53c2\u7167\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u226b <a href=\"https:\/\/cloud.google.com\/sdk\/docs\/install?hl=ja\">gcloud CLI \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/a><\/p>\n<h3>GAE\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>Google Cloud Console \u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u9078\u629e\u306e\u753b\u9762\u304b\u3089\u53f3\u4e0a\u306e\u300c\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/software.satoshis.jp\/wp-content\/uploads\/2023\/03\/gae-new-300x77.png\" alt=\"\" width=\"300\" height=\"77\" class=\"alignnone size-medium wp-image-380\" srcset=\"https:\/\/software.satoshis.jp\/wp-content\/uploads\/2023\/03\/gae-new-300x77.png 300w, https:\/\/software.satoshis.jp\/wp-content\/uploads\/2023\/03\/gae-new-1024x262.png 1024w, https:\/\/software.satoshis.jp\/wp-content\/uploads\/2023\/03\/gae-new-768x196.png 768w, https:\/\/software.satoshis.jp\/wp-content\/uploads\/2023\/03\/gae-new.png 1518w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<h3>gcloud CLI \u306e\u521d\u671f\u5316<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066gcloud CLI\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% gcloud init\r\n<\/pre>\n<p>\u8a8d\u8a3c\u3059\u308b\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u805e\u304b\u308c\u305f\u308a\u3001\u95a2\u9023\u4ed8\u3051\u308b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u805e\u304b\u308c\u308b\u306e\u3067\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u4e0a\u3067\u756a\u53f7\u3067\u5fdc\u7b54\u3057\u307e\u3059\u3002<\/p>\n<h3>\u4f5c\u6210\u3057\u305fLaravel\u30a2\u30d7\u30ea\u306e\u30c7\u30d7\u30ed\u30a4<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30c7\u30d7\u30ed\u30a4\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b3\u30de\u30f3\u30c9\u5165\u529b\u76f4\u5f8c\u306b\u7d9a\u3051\u308b\u304b\u3092\u78ba\u8a8d\u3055\u308c\u308b\u306e\u3067\u3001y\u3092\u5165\u529b\u3057\u3066\u7d99\u7d9a\u3057\u307e\u3059\u3002<br \/>\n\u5b8c\u4e86\u3059\u308b\u307e\u3067\u6570\u5206\u304b\u304b\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% gcloud app deploy\r\nServices to deploy:\r\n\r\ndescriptor:                  &#x5B;app.yaml\u306e\u30d1\u30b9]\r\nsource:                      &#x5B;Laravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d1\u30b9]\r\ntarget project:              &#x5B;GAE\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8ID]\r\ntarget service:              &#x5B;default]\r\ntarget version:              &#x5B;20230329t180000]\r\ntarget url:                  &#x5B;https:\/\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8ID.appspot.com]\r\ntarget service account:      &#x5B;App Engine default service account]\r\n\r\n\r\nDo you want to continue (Y\/n)?  y\r\n<\/pre>\n<p>\u30c7\u30d7\u30ed\u30a4\u304c\u5b8c\u4e86\u3059\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nBeginning deployment of service &#x5B;default]...\r\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\r\n\u2560\u2550 Uploading nnnnn files to Google Cloud Storage               \u2550\u2563\r\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\r\nFile upload done.\r\nUpdating service &#x5B;default]...done.\r\nSetting traffic split for service &#x5B;default]...done.\r\nDeployed service &#x5B;default] to &#x5B;https:\/\/\u30d7\u30ed\u30b8\u30a7\u30af\u30c8ID.appspot.com]\r\n\r\nYou can stream logs from the command line by running:\r\n  $ gcloud app logs tail -s default\r\n\r\nTo view your application in the web browser run:\r\n  $ gcloud app browse\r\n<\/pre>\n<h3>GAE\u4e0a\u306eLaravel\u30a2\u30d7\u30ea\u306e\u52d5\u4f5c\u78ba\u8a8d<\/h3>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n% gcloud app browse\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>GAE(Google Apps Engine)\u3067Laravel\u304c\u52d5\u304f\u3089\u3057\u3044\u306e\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002 Laravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210 \u307e\u305a\u306f\u666e\u901a\u306bLaravel\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002 % compos &#8230; <\/p>\n","protected":false},"author":1,"featured_media":381,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146,3],"tags":[147,148,14],"class_list":["post-379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gae","category-laravel","tag-gae","tag-gcloud","tag-laravel"],"nelio_content":{"autoShareEndMode":"never","automationSources":{"useCustomSentences":false,"customSentences":[]},"efiAlt":"","efiUrl":"","followers":[1],"highlights":[],"isAutoShareEnabled":true,"networkImageIds":[],"permalinkQueryArgs":[],"series":[],"suggestedReferences":[]},"views":1747,"_links":{"self":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=379"}],"version-history":[{"count":1,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":382,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/posts\/379\/revisions\/382"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=\/wp\/v2\/media\/381"}],"wp:attachment":[{"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/software.satoshis.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}