繁体   English   中英

我无法使用 Visual Studio 2019 中的 Google Cloud Platform 工具将 App Engine 应用程序发布到 GCloud

[英]I can't publish a App Engine application to GCloud using the Google Cloud Platform tools in Visual Studio 2019

我刚刚将我的应用程序移动到使用 ASP.Net on.Net Core 3.1。 我以前使用的是 NodeJS 和 Express。 我安装了适用于 Visual Studio 的 Google Cloud Platform 工具,在我的项目上使用右键单击菜单生成了 app.yaml 和 Dockerfile,将 app.yaml 修改为我认为是有效的配置,并尝试发布它。 我选择了 App Engine Flex,选择了我的项目,然后我收到一条消息“所选的 GCP 项目需要在部署之前启用服务。启用服务”消息。 单击启用服务(看起来像一个链接)不会执行任何操作。 这会阻止 be 发布我的应用程序,这有点烦人。

任何帮助将不胜感激:)

应用程序.yaml

service: api
runtime: custom
env: flex
env_variables:
    ASPNETCORE_ENVIROMENT: "production"
instance_class: F2
automatic_scaling:
    min_idle_instances: 0
    max_idle_instances: 2
    min_pending_latency: 15ms
    max_pending_latency: 100ms

Dockerfile

FROM gcr.io/google-appengine/aspnetcore:3.1
COPY . /app
WORKDIR /app
ENTRYPOINT ["dotnet", "Project Phoenix Game Services.dll"]

启用 App Engine 管理 API。

这也发生在我身上,当我试图发布 .NET 6 Web API 时。为了解决这个问题,我做了以下事情:

  1. 去了我的仪表板https://console.cloud.google.com/
  2. 使用顶部的搜索栏搜索“App Engine Admin API”
  3. 启用它。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM