From f5096a1f2668244524ad5896297afcedbfa845f0 Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Thu, 6 Jan 2022 14:51:56 -0800 Subject: [PATCH] add wait for docker in controller startup script --- ext/central-controller-docker/main.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ext/central-controller-docker/main.sh b/ext/central-controller-docker/main.sh index 3a625ede5..84f14634b 100755 --- a/ext/central-controller-docker/main.sh +++ b/ext/central-controller-docker/main.sh @@ -79,6 +79,11 @@ echo "{ } " > /var/lib/zerotier-one/local.conf +until /usr/pgsql-10/bin/pg_isready -h ${ZTC_DB_HOST} -p ${ZTC_DB_PORT}; do + echo "Waiting for PostgreSQL..."; + sleep 2; +done + export GLIBCXX_FORCE_NEW=1 export GLIBCPP_FORCE_NEW=1 export LD_PRELOAD="/usr/lib64/libjemalloc.so"