我如何使用appengine gradle插件将其部署到定制服务? [英] how do I deploy to a custom service with the appengine gradle plugin?
问题描述
我已经看到文档中的所有参数
一>。但是它们都不允许覆盖生成的yaml中的 service
参数。 我试着用下面的app.yaml使用 deployables = app.yaml
,但它给了我一个500错误:
运行时:java7
线程安全:真
api_version:'1.0'
服务:后端
处理程序:
- url:/.*
脚本:未使用
登录:可选
安全:可选
skip_files:app.yaml
任何想法我做错了?
services
参数决定了服务的名称,这意味着部署针对的服务。 因此,无法覆盖 services
参数,因为只要您更改它,您只需部署到其他服务。
因此,如果您只想更改服务的名称,您应该: 使用
gcloud应用服务删除
:
$ gcloud app services delete old_service_name
这些步骤的顺序可能对您的情况很重要,您可能想要将它们撤消。
I have seen all the parameters from the documentation. But none of them allow to override the service
parameter from the generated yaml.
I tried using deployables = app.yaml
with the app.yaml below but it gives me a 500 error:
runtime: java7
threadsafe: True
api_version: '1.0'
service: backend
handlers:
- url: /.*
script: unused
login: optional
secure: optional
skip_files: app.yaml
Any idea what I'm doing wrong ?
The services
parameter is what determines the service's name, meaning the service the deployment is directed to.
So there is no way to overwrite the services
parameter because as soon as you change it you're simply deploying to a different service.
So if you want to just change a service's name you should:
- simply deploy with the new name, creating a new service
delete the old service using
gcloud app services delete
:$ gcloud app services delete old_service_name
The order of the steps may matter for your case, you may want to reverse them.
这篇关于我如何使用appengine gradle插件将其部署到定制服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!