From eea4d3ebb0ef46ecb991df505a5e4543679322b7 Mon Sep 17 00:00:00 2001 From: Alan Ivey Date: Mon, 6 Nov 2023 14:27:09 -0500 Subject: [PATCH] fix: curl buffer problem fixed --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index da68a02..e03a0ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -214,7 +214,8 @@ ${CONFIG_OPTION} = {{ getv("${TEMPLATE_OPTION}") }} EOS done # Add clustering settings (keep template logic in Remco for DNS lookups of SERVICE_NAME) -if curl -fsSL "$DHIS2_CONFIGKEY_URL" | grep -q 'CLUSTER_HOSTNAME(\s*"cluster\.hostname",' ; then +# See https://stackoverflow.com/a/28879552 +if { curl -fsSL "$DHIS2_CONFIGKEY_URL" | tac | tac | grep -q 'CLUSTER_HOSTNAME(\s*"cluster\.hostname",' ; } ; then cat dhis-cluster.conf.tmpl >> /tmp/.dhis.conf.tmpl fi # Add read-replica settings