From: Emilie Date: Tue, 10 Apr 2018 13:52:00 +0000 (+0200) Subject: [wait.sh] : auto detect db port X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=65c9c2468e8290be57daed7410bc68fb34d08281;p=docker-django-scripts.git [wait.sh] : auto detect db port --- diff --git a/misc/wait.sh b/misc/wait.sh index 26a309f..af588e9 100755 --- a/misc/wait.sh +++ b/misc/wait.sh @@ -5,8 +5,8 @@ set -e apt update apt install -y netcat -HOST=db -PORT=5432 +HOST=$(env | grep _TCP_ADDR | cut -d = -f 2) +PORT=$(env | grep _TCP_PORT | cut -d = -f 2) echo -n "waiting for TCP connection to $HOST:$PORT..."