From 36a8d7d350894e4dbec80b1a525da903e1c874ec Mon Sep 17 00:00:00 2001 From: Tony Williams Date: Wed, 26 Jun 2024 10:54:49 +0100 Subject: [PATCH] Health check against 0.0.0.0 instead of localhost For the simulator & quoting service the HAPI.server is configured specifically to listen to 0.0.0.0. Other services don't set this and the default is 127.0.0.1. Now recent changes to the docker engine made a change to how localhost is resolved, it used to be ipv4 but now is ipv6. This means for people using a later version of docker the localhost would resolve to ::1 which the quoting service and simulator do not listen to. --- docker-compose-perf.yml | 2 +- docker-compose.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose-perf.yml b/docker-compose-perf.yml index ec7a25ee..9391fdc0 100644 --- a/docker-compose-perf.yml +++ b/docker-compose-perf.yml @@ -492,7 +492,7 @@ services: volumes: - ./docker/config-modifier:/opt/app/config-modifier healthcheck: - test: wget -q http://localhost:3002/health -O /dev/null || exit 1 + test: wget -q http://0.0.0.0:3002/health -O /dev/null || exit 1 timeout: 20s retries: 30 interval: 15s diff --git a/docker-compose.yml b/docker-compose.yml index 066dbfc0..787abc2f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,7 @@ services: volumes: - ./docker/config-modifier:/opt/app/config-modifier healthcheck: - test: wget -q http://localhost:3002/health -O /dev/null || exit 1 + test: wget -q http://0.0.0.0:3002/health -O /dev/null || exit 1 timeout: 20s retries: 30 interval: 15s @@ -213,7 +213,7 @@ services: networks: - mojaloop-net healthcheck: - test: wget -q http://localhost:8444/health -O /dev/null || exit 1 + test: wget -q http://0.0.0.0:8444/health -O /dev/null || exit 1 timeout: 20s retries: 10 interval: 30s