Renaming docker environment variables.
This commit is contained in:
parent
4a1c36d003
commit
a457297c5f
8 changed files with 25 additions and 23 deletions
|
|
@ -4,7 +4,7 @@ cd /scripts
|
|||
|
||||
RELOAD="true"
|
||||
|
||||
if [[ "$DISCOVER" == "static" ]]; then
|
||||
if [[ "$EASYHAPROXY_DISCOVER" == "static" ]]; then
|
||||
CONTROL_FILE="/etc/haproxy/haproxy.cfg"
|
||||
touch ${CONTROL_FILE}
|
||||
cp ${CONTROL_FILE} ${CONTROL_FILE}.old
|
||||
|
|
@ -15,7 +15,7 @@ else
|
|||
mv ${CONTROL_FILE} ${CONTROL_FILE}.old
|
||||
touch ${CONTROL_FILE}
|
||||
|
||||
if [[ "$DISCOVER" == "docker" ]]; then
|
||||
if [[ "$EASYHAPROXY_DISCOVER" == "docker" ]]; then
|
||||
CONTAINERS=$(docker ps -q)
|
||||
LABEL_PATH=".Config.Labels"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if os.getenv("HAPROXY_PASSWORD"):
|
|||
"port": os.getenv("HAPROXY_STATS_PORT") if os.getenv("HAPROXY_STATS_PORT") else "1936",
|
||||
}
|
||||
|
||||
result["lookup_label"] = os.getenv("LOOKUP_LABEL") if os.getenv("LOOKUP_LABEL") else "easyhaproxy"
|
||||
result["lookup_label"] = os.getenv("EASYHAPROXY_LABEL_PREFIX") if os.getenv("EASYHAPROXY_LABEL_PREFIX") else "easyhaproxy"
|
||||
|
||||
cfg = HaproxyConfigGenerator(result)
|
||||
print(cfg.generate(lineList))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue