您如何在 Amazon Elastic Beanstalk (AWS EBS) 上传递自定义环境变量? [英] How do you pass custom environment variable on Amazon Elastic Beanstalk (AWS EBS)?
问题描述
亚马逊 Elastic Beanstalk 简介说:
<块引用>Elastic Beanstalk 可让您打开引擎盖"并保留完全控制权……甚至可以通过 Elastic Beanstalk 控制台传递环境变量.
中一样在 .ebextensions
中创建变量仍然有效.
它甚至可以是更可取的,例如如果您稍后将部署到另一个环境并且害怕忘记手动设置它们,或者您可以将值提交给源代码管理.我混合使用两者.
The Amazon Elastic Beanstalk blurb says:
Elastic Beanstalk lets you "open the hood" and retain full control ... even pass environment variables through the Elastic Beanstalk console.
http://aws.amazon.com/elasticbeanstalk/
How to pass other environment variables besides the one in the Elastic Beanstalk configuration?
As a heads up to anyone who uses the .ebextensions/*.config
way: nowadays you can add, edit and remove environment variables in the Elastic Beanstalk web interface.
The variables are under Configuration → Software Configuration:
Creating the vars in .ebextensions
like in Onema's answer still works.
It can even be preferable, e.g. if you will deploy to another environment later and are afraid of forgetting to manually set them, or if you are ok with committing the values to source control. I use a mix of both.
这篇关于您如何在 Amazon Elastic Beanstalk (AWS EBS) 上传递自定义环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!