use the external interface, and remove the useless chown on the exe
This commit is contained in:
parent
0291351ae2
commit
8382f96132
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue