How to deploy one app engine app to multiple projects

后端 未结 4 1171
我在风中等你
我在风中等你 2021-01-07 02:38

My problem is that I want to create dev, stage, prod environments by using different GCP projects.

Basically they are running

4条回答
  •  被撕碎了的回忆
    2021-01-07 03:23

    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.

    application: myproject
    version: alpha-001
    runtime: python27
    api_version: 1
    threadsafe: true
    
    handlers:
    - url: /
      script: home.app
    

    If you don't want to change the application value in this file for each project, you can run the following:

    appcfg.py -A  -V v1 update myapp/
    

    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.

提交回复
热议问题