From 2c9e0dbb0f0030eb366373585efce51469bbf9f6 Mon Sep 17 00:00:00 2001 From: Dmitry Dudin Date: Tue, 18 Jan 2022 17:04:46 +0700 Subject: [PATCH] fix: Health check Parse server (#47) Signed-off-by: Dmitry Dudin --- .../rootfs/opt/bitnami/scripts/libparsedashboard.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitnami/parse-dashboard/3/debian-10/rootfs/opt/bitnami/scripts/libparsedashboard.sh b/bitnami/parse-dashboard/3/debian-10/rootfs/opt/bitnami/scripts/libparsedashboard.sh index d061cc72e75e..28567ab5df79 100644 --- a/bitnami/parse-dashboard/3/debian-10/rootfs/opt/bitnami/scripts/libparsedashboard.sh +++ b/bitnami/parse-dashboard/3/debian-10/rootfs/opt/bitnami/scripts/libparsedashboard.sh @@ -177,13 +177,13 @@ parse_dashboard_conf_get() { ######################### parse_dashboard_wait_for_parse_connection() { local -r host="${1:?missing connection string}" - # Using the users API endpoint to check that Parse works - # Based on https://docs.parseplatform.org/rest/guide/#retrieving-users + # Using the health API endpoint to check that Parse works + # https://github.com/parse-community/parse-server/blob/release/src/ParseServer.js#L168 check_parse_connection() { - local -r curl_args=("-k" "--header" "X-Parse-Application-Id: ${PARSE_DASHBOARD_PARSE_APP_ID}" "${host}/users") + local -r curl_args=("-k" "--header" "X-Parse-Application-Id: ${PARSE_DASHBOARD_PARSE_APP_ID}" "${host}/health") local -r res="$(curl "${curl_args[@]}" 2>&1)" debug "$res" - echo "$res" | grep -q '"results"' + echo "$res" } if ! retry_while "check_parse_connection"; then error "Could not connect to Parse"