From ab466fa9f2350b15a5d5f93fb209907baa6b2c36 Mon Sep 17 00:00:00 2001 From: Stanislav Vitko Date: Wed, 11 May 2022 19:09:18 -0700 Subject: [PATCH] feat: ability to modify bind --- Dockerfile | 3 ++- haproxy.cfg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1a13d20..8357057 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,5 +27,6 @@ ENV ALLOW_RESTARTS=0 \ SYSTEM=0 \ TASKS=0 \ VERSION=1 \ - VOLUMES=0 + VOLUMES=0 \ + BIND=":2375" COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg diff --git a/haproxy.cfg b/haproxy.cfg index 011137e..341b70b 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -40,7 +40,7 @@ backend dockerbackend server dockersocket $SOCKET_PATH frontend dockerfrontend - bind :2375 + bind $BIND http-request deny unless METH_GET || { env(POST) -m bool } http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/containers/[a-zA-Z0-9_.-]+/((stop)|(restart)|(kill)) } { env(ALLOW_RESTARTS) -m bool } http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/auth } { env(AUTH) -m bool }