From dd279b1be865c3e714633784f84ae6f0ab16b0ff Mon Sep 17 00:00:00 2001 From: Sorin Sugar Date: Thu, 6 Jun 2019 10:58:46 +0300 Subject: [PATCH] Add TimeOut to pound config and expose it to env vars. --- README.md | 8 +++++--- entrypoint.sh | 1 + pound.cfg | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b418e21..124c207 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ location /cert.pem by the container. docker run \ -e HTTPS_UPSTREAM_SERVER_ADDRESS=othercontainer \ -e HTTPS_UPSTREAM_SERVER_PORT=80 \ + -e TIMEOUT=15 \ -v /path/to/cert.pem:/cert.pem:ro \ --link othercontainer:othercontainer \ mnuessler/tls-termination-proxy @@ -45,14 +46,15 @@ The following command shows the alternative settings to support kubernetes volum docker run \ -e HTTPS_UPSTREAM_SERVER_ADDRESS=othercontainer \ -e HTTPS_UPSTREAM_SERVER_PORT=80 \ - -e CERT_PATH=/certs/cert.pem + -e CERT_PATH=/certs/cert.pem \ + -e TIMEOUT=15 \ -v /path/to/certs/:/certs/:ro \ --link othercontainer:othercontainer \ mnuessler/tls-termination-proxy ``` -Notice that `CERT_PATH` has to be configures and the volume has to point to a directory, not -the cretificate file itself. +Notice that `CERT_PATH` has to be configured and the volume has to point to a directory, not +the certificate file itself. If `CERT_PATH` is not configured, it will default to `/cert.pem`. ### Build the image diff --git a/entrypoint.sh b/entrypoint.sh index 20a1a34..c87b48c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -12,6 +12,7 @@ fi # Environmenat variables and defaults for the configuration export HTTPS_UPSTREAM_SERVER_ADDRESS=${HTTPS_UPSTREAM_SERVER_ADDRESS:-"upstream"} export HTTPS_UPSTREAM_SERVER_PORT=${HTTPS_UPSTREAM_SERVER_PORT:-80} +export TIMEOUT=${TIMEOUT:-15} # Prepare configuration file config=/etc/pound/pound.cfg diff --git a/pound.cfg b/pound.cfg index 2b3efbe..74a6988 100644 --- a/pound.cfg +++ b/pound.cfg @@ -25,6 +25,9 @@ LogFacility - ## check backend every X secs: Alive 30 +## set timeout (defaults to 15 seconds): +TimeOut ${TIMEOUT} + ## use hardware-accelleration card supported by openssl(1): #SSLEngine ""