[英]How do I deploy the files from my app bucket in GCS from cloud shell in App engine?
I am trying to create my first php app using GCS.我正在尝试使用 GCS 创建我的第一个 php 应用程序。
I have placed all my php app files in the bucket (including my.yaml file) created by the app engine, but I am struggling to access the files to deploy the app using the cloud shell in app engine?我已将所有 php 应用程序文件放在应用程序引擎创建的存储桶中(包括 my.yaml 文件),但我很难访问文件以使用云 Z2591C98B70119FE624898B1E424 中的应用程序部署应用程序?
If I has them stored in git I would have used the clone commands but would assume that this would have placed the files in the same bucket that I have manually uploaded the files to through the bucket browser?!如果我将它们存储在 git 中,我会使用克隆命令,但会假设这会将文件放在我通过存储桶浏览器手动上传文件的同一存储桶中?!
I either cant find the correct file path as the buckets do not appear to be part of my /home/username directory or I am missing a key link like an API to the cloud storage service (GSUtil?).我要么找不到正确的文件路径,因为存储桶似乎不是我的 /home/username 目录的一部分,要么我缺少一个关键链接,如 API 到云存储服务(GSUtil?)。
Can anyone point me in the right direction?谁能指出我正确的方向?
JH JH
You shouldn't be manually placing any files into the (app's staging) GCS bucket yourself to deploy an app to app engine.您不应该自己手动将任何文件放入(应用程序的暂存)GCS 存储桶以将应用程序部署到应用程序引擎。
Instead, place the files (including your app.yaml
) in a working directory on your machine (or cloud shell), then use the gcloud app deploy
command to deploy them.相反,将文件(包括您的
app.yaml
)放在您机器(或云外壳)上的工作目录中,然后使用gcloud app deploy
命令部署它们。 You can see an example of how to deploy a PHP app here .您可以在此处查看如何部署 PHP 应用程序的示例。 The
gcloud app deploy
command is going to look for the source files on the local filesystem. gcloud app deploy
命令将在本地文件系统上查找源文件。
Note that using git isn't a requirement (though using some form of source control is always a good development practice), it is just the way the files are copied onto the local machine in this example.请注意,使用 git 不是必需的(尽管使用某种形式的源代码控制始终是一种很好的开发实践),这只是在此示例中将文件复制到本地计算机的方式。
(Likewise -- GCS buckets won't show up in the cloud shell filesystem -- GCS is a blob storage service not a normal filesystem, so you would need to use a tool like gsutil or the GCS API to access it). (同样——GCS 存储桶不会出现在云 shell 文件系统中——GCS 是一种 blob 存储服务而不是普通文件系统,因此您需要使用像gsutil或GCS API这样的工具来访问它)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.