use the external interface, and remove the useless chown on the exe

This commit is contained in:
Pierre Guillot 2019-07-25 16:35:53 +02:00
parent 0291351ae2
commit 8382f96132
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
FROM sonarqube
COPY --chown=sonarqube:sonarqube docker-healthcheck /usr/local/bin/
COPY docker-healthcheck /usr/local/bin/
HEALTHCHECK CMD ["docker-healthcheck"]

View File

@ -2,8 +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')"
if curl -Ss http://localhost:9000/api/system/status | grep -q -e '"status":"UP"' -e '"status":"DB_MIGRATION_NEEDED"' -e '"status":"DB_MIGRATION_RUNNING"'; then
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
exit 0
fi