Skip to content

Commit 0a0705b

Browse files
Override health check port with $PORT
The proxy server allows you to configure the port that it runs on with the environment variable `PORT`. If you do that, the health check will fail because 8080 is hard-coded and docker-flow-proxy will continually reload itself. This will use the port from `PORT` and fallback to 8080 if it's not found
1 parent 6df8150 commit 0a0705b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scripts/check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if [[ "$HEALTHCHECK" == "true" ]]; then
22

3-
wget -qO- "http://localhost:8080/v1/docker-flow-proxy/ping"
3+
wget -qO- "http://localhost:${PORT:-8080}/v1/docker-flow-proxy/ping"
44

55
if [[ $? -ne 0 ]]; then
66
echo "ERROR: Failed to ping docker-flow-proxy"
@@ -17,7 +17,7 @@ if [[ "$HEALTHCHECK" == "true" ]]; then
1717
if [[ "$LISTENER_ADDRESS" != "" ]]; then
1818

1919
while true; do
20-
wget -qO- "http://localhost:8080/v1/docker-flow-proxy/successfulinitreload"
20+
wget -qO- "http://localhost:${PORT:-8080}/v1/docker-flow-proxy/successfulinitreload"
2121

2222
if [[ $? -eq 0 ]]; then
2323
exit 0

0 commit comments

Comments
 (0)