问题描述
难道posssible引用PARAM1 /参数2等。从.ebextensions容器环境属性配置文件。如果是这样,怎么样?我试过$ PARAM1但它似乎是一个空值。
我要设置在启动时的主机名包含DEV,QA和PROD,这是我通过PARAM1环境变量传递给我的容器。
命令:
01,设置正确的主机名:
命令:主机名myappname {$ PARAM1} .COM
原来,你只能做到这一点,在 container_commands
部分,而不是命令
部分。
本作品:
container_commands:
01,设置正确的主机名:
命令:主机名myappname {$ PARAM1} .COM
请参阅http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-container_commands了解更多详情。
Is it posssible to reference the PARAM1 / PARAM2 etc.. container environment properties from the .ebextensions config files. If so, how? I tried $PARAM1 but it seemed to be an empty value.
I want to set the hostname on startup to contain DEV, QA or PROD, which I pass to my container via the PARAM1 environment variable.
commands:
01-set-correct-hostname:
command: hostname myappname{$PARAM1}.com
It turns out you can only do this in the container_commands
section, not the commands
section.
This works:
container_commands:
01-set-correct-hostname:
command: "hostname myappname{$PARAM1}.com"
See http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-container_commands for more details.
这篇关于从弹性魔豆.ebextensions配置文件中引用的env变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!