docker-archive / dockercloud-haproxy

HAproxy image that autoreconfigures itself when used in Docker Cloud
https://cloud.docker.com/
651 stars 187 forks source link

Support combining multiple envvars for some config options #211

Closed ashirley closed 7 years ago

ashirley commented 7 years ago

For the configuration options which take a list of values, I think it makes sense to be able to specify these in multiple environment variables which are combined before use.

This is particularly useful with multiple docker-compose files which want to contribute to the configuration. For example I have a base docker-compose.yml file and 2 overrides which both define EXTRA_FRONTEND_SETTINGS_80. it is fine to docker-compose -f docker-compose.yml -f override1.yml up and similarly for override2.yml but it isn't possible to use both overrides simultaneously as one completely overrides the extra settings variable of the other.

I hope that makes sense.

P.S. The table in the documentation could do with a tidy. I can either do that as part of this PR or raise a separate one later if you'd prefer.

tifayuki commented 7 years ago

I have merged the PR in to staging branch. Will target a new release soon. Thank you.