Google应用引擎是否支持环境变量? [英] Does google app engine support environment variables?

查看:166
本文介绍了Google应用引擎是否支持环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,开发者控制台似乎没有暴露在我可以配置静态环境变量的任何地方。

I've noticed that the developer console doesn't seem to expose anywhere where I can configure static environment variables.

对GAE的期望值将被捆绑那些变量是我的构建服务器部署的一部分?如果是这样,GAE / Google Cloud是否有任何文档,涵盖了原理或细节的理念?

Is the expectation on GAE that I will bundle those variables as part of the deployment from my build server? If so, is there any documentation on GAE/Google Cloud that covers why or details the philosophy?

推荐答案

可以定义环境变量在你的应用程序的 app.yaml

Environment variables can be defined in your application's app.yaml

一个python / php /(也许go?)应用程序的例子。 Java使用不同的格式。

An example for a python/php/(maybe go?) app. Java uses a different format.

env_variables:
  MY_ENV_VAR: 'some value here'

https://cloud.google.com/appengine/docs/python/config/appconfig#Python_app_yaml_Defining_environment_variables

您可以设置这些值在您的CI过程中,如果您需要通过以编程方式将其附加到您的app.yaml中,然后再部署。

You can set these values during your CI process as well if you need to by programmatically appending them to your app.yaml before deploying.

这篇关于Google应用引擎是否支持环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆