dockercloud-haproxy
dockercloud-haproxy copied to clipboard
Add support for prefix in services environment variables
trafficstars
Currently all the environment variables that needs to be set on the application services are NOT prefixed. This could cause some collision with some other configurations.
For example, you specify we need to use the generic "OPTION" environment variable to set custom options.
I'd suggest to add something like SERVICE_ENV_PREFIX (or some other name), which could be empty by default to ensure backward compatiblity.
This way one could set SERVICE_ENV_PREFIX="HAPROXY_" on the dockercloud/haproxy service, and then set backend configuration using prefixed environment variables like HAPROXY_VIRTUAL_HOST instead of VIRTUAL_HOST.