From d15ef8d4e4d2d211ab468cd083a4b41bb79d1b6c Mon Sep 17 00:00:00 2001 From: Lev Vereshchagin Date: Fri, 17 Dec 2021 11:25:46 +0300 Subject: [PATCH] Use jq for parsing config in healthcheck --- build/worker/Dockerfile | 1 + build/worker/healthcheck.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/build/worker/Dockerfile b/build/worker/Dockerfile index cd3710ca..db862293 100644 --- a/build/worker/Dockerfile +++ b/build/worker/Dockerfile @@ -85,6 +85,7 @@ RUN apt-get update \ wkhtmltopdf \ # For healthcheck.sh in helm chart wait-for-it \ + jq \ # other nodejs \ && rm -rf /var/lib/apt/lists/* diff --git a/build/worker/healthcheck.sh b/build/worker/healthcheck.sh index 642ba046..a3fffac1 100755 --- a/build/worker/healthcheck.sh +++ b/build/worker/healthcheck.sh @@ -2,7 +2,7 @@ set -e get_key() { - grep "$1" /home/frappe/frappe-bench/sites/common_site_config.json | awk -v word="$1" '$word { gsub(/[",]/,"",$2); print $2}' | tr -d '\n' + jq -r ".$1" /home/frappe/frappe-bench/sites/common_site_config.json } get_redis_url() {