Google App Engine Flexible - environment variables

坚强是说给别人听的谎言 提交于 2019-11-30 18:30:53

问题


if I have my circle-ci deplying to google with e.g. '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>

回答1:


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!



来源:https://stackoverflow.com/questions/42447698/google-app-engine-flexible-environment-variables

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!