简体   繁体   中英

Google App Engine Flexible - environment variables

if I have my circle-ci deplying to google with eg 'gcloud app deploy app.yaml' is there a simple way I can pass a dev / prod variable and have it replaced in my app.yml file below ?

Sure, I could have multiple app.dev.yml, app.dev.yml files etc but theres a lot of duplication involved unless I can just override some by using some sort of base app.yml

runtime: nodejs
env: flex
service: email

env_variables:
  PUBSUB_TOPIC: dev-email-integration-email
  PUBSUB_VERIFICATION_TOKEN: <your-verification-token>

Sadly there really isn't a good way to do this. I'd actually suggest not using app.yaml for this purpose, and instead using a json file and nconf . That's how we do it in all of our nodejs samples .

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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