如何将一个应用引擎应用部署到多个项目 [英] How to deploy one app engine app to multiple projects
问题描述
我的问题是我想要创建 基本上它们运行相同的代码,只是在不同的孤立环境中运行它们。 我现在在命令行中使用 如何有效地将应用程序部署到不同的项目? 或者,是否有更好的方式让我在应用上下文中设置 感谢。 对于Python应用程序,您可以在app.yaml文件中设置应用程序。这使您可以为每个项目使用不同的数据。这是当您使用appcfg.py命令进行部署时。 如果您不想为每个项目更改此文件中的应用程序值,可以运行以下命令: https://cloud.google.com/appengine/docs/python/config/appref 如果您未在文件中指定应用程序,请在部署时使用appcfg命令中的--application选项。使用gcloud app deploy命令进行部署时,此元素将被忽略。 My problem is that I want to create Basically they are running the same code, just running them in different isolated environments. I'm using How can I efficiently deploy an app to different project? Or, is there a better way for me to set up Thanks. For Python applications, you can set application in the app.yaml file. This allows you to use different data for each project. This is when you deploy using the appcfg.py command. If you don't want to change the application value in this file for each project, you can run the following: https://cloud.google.com/appengine/docs/python/config/appref If you do not specify the application in the file, use the --application option in the appcfg command when you deploy. This element is ignored when you deploy using the gcloud app deploy command.
这篇关于如何将一个应用引擎应用部署到多个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! dev
, stage
, prod
>环境中使用不同的GCP项目。
gcloud app deploy
部署应用程序。
我必须做 gcloud init
来更改我的每次配置默认项目?
必须有一些更好的做法。
dev
...环境引擎?
$ b $ p
application:myproject
version:alpha-001
运行时:python27
api_version:1
线程安全:true
处理程序:
- url:/
脚本:home.app
appcfg.py -A< YOUR_PROJECT_ID> -V v1更新myapp /
dev
, stage
, prod
environments by using different GCP projects. gcloud app deploy
in command line to deploy app right now.
Do I have to do gcloud init
to change my configuration of default project every time?
There must be some better practices. dev
... environments in the context of app engine?application: myproject
version: alpha-001
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /
script: home.app
appcfg.py -A <YOUR_PROJECT_ID> -V v1 update myapp/