diff --git a/sonarqube/docker-healthcheck b/sonarqube/docker-healthcheck index 9bafe3b..3975590 100755 --- a/sonarqube/docker-healthcheck +++ b/sonarqube/docker-healthcheck @@ -2,9 +2,9 @@ # A Sonarqube container is considered healthy if the status is UP, DB_MIGRATION_NEEDED or DB_MIGRATION_RUNNING # status about migration are added to prevent the node to be kill while sonarqube is updating himself. -host="$(hostname --ip-address || echo '127.0.0.1')" +host="$(hostname -i || echo '127.0.0.1')" -if curl -Ss http://${host}:9000/api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then +if wget -qO- http://${host}:9000/api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then exit 0 fi