Google Cloud 警告:自动应用检测已弃用,很快就会被删除
Google Cloud WARNING: Automatic app detection is deprecated and will soon be removed
我正在尝试将 nodejs 项目部署到 Google Cloud,但在进入 gcloud app deploy 后 Google Cloud SDK Shell 中出现以下错误。
我在部署之前完成了以下操作。 (我概述了引号块中的步骤,因为下面的代码存在一些奇怪的格式问题,它实际上并没有从任何地方引用)。非常感谢!
- Created a project in Google Cloud
- Created app.yaml in the same folder as my app.js. I specified runtime:nodejs and env:flex for the app.yaml
- I set the port to 8080 and added "start": "node app.js", to package.json
- I opened Google Cloud SDK Shell then entered: gcloud auth login. Then I entered gcloud config set project and put in my project ID.
Then I entered: gcloud app deploy.
WARNING: Automatic app detection is deprecated and will soon be removed.
As an alternative, create an app.yaml file yourself using the directions at
https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-
with-app-yaml (App Engine Flexible Environment) or
https://cloud.google.com/appengine/docs/standard/python/config/appref (App
Engine Standard Environment) under the tab for your language.
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml for you in
the current directory (if the current directory does not contain an App Engine
service, please answer "no").
我通过将我的文件提交到我的本地存储库来修复它。我真的不知道为什么,但这是我唯一改变并且有效的东西。
您使用的 gcloud app deploy
部署命令没有为要部署的服务指定 app.yaml
。根据调用 context/environment 文件检测(或生成)的自动逻辑并不总是产生用户可能期望的结果,因此出现警告。
修复(和一般建议)是始终在部署命令中指定文件(而不是依赖于并非 100% 可靠的自动 detection/generation),如下所示:
gcloud app deploy [path_to/]app.yaml
我正在尝试将 nodejs 项目部署到 Google Cloud,但在进入 gcloud app deploy 后 Google Cloud SDK Shell 中出现以下错误。 我在部署之前完成了以下操作。 (我概述了引号块中的步骤,因为下面的代码存在一些奇怪的格式问题,它实际上并没有从任何地方引用)。非常感谢!
- Created a project in Google Cloud
- Created app.yaml in the same folder as my app.js. I specified runtime:nodejs and env:flex for the app.yaml
- I set the port to 8080 and added "start": "node app.js", to package.json
- I opened Google Cloud SDK Shell then entered: gcloud auth login. Then I entered gcloud config set project and put in my project ID. Then I entered: gcloud app deploy.
WARNING: Automatic app detection is deprecated and will soon be removed.
As an alternative, create an app.yaml file yourself using the directions at
https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-
with-app-yaml (App Engine Flexible Environment) or
https://cloud.google.com/appengine/docs/standard/python/config/appref (App
Engine Standard Environment) under the tab for your language.
Deployment to Google App Engine requires an app.yaml file. This
command will run `gcloud beta app gen-config` to generate an app.yaml for you in
the current directory (if the current directory does not contain an App Engine
service, please answer "no").
我通过将我的文件提交到我的本地存储库来修复它。我真的不知道为什么,但这是我唯一改变并且有效的东西。
您使用的 gcloud app deploy
部署命令没有为要部署的服务指定 app.yaml
。根据调用 context/environment 文件检测(或生成)的自动逻辑并不总是产生用户可能期望的结果,因此出现警告。
修复(和一般建议)是始终在部署命令中指定文件(而不是依赖于并非 100% 可靠的自动 detection/generation),如下所示:
gcloud app deploy [path_to/]app.yaml