Commit c9b0434d authored by Luca Cinquini's avatar Luca Cinquini
Browse files

Adding script to wait for postgres to be ready

parent 75eee141
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
#!/bin/sh
# Script to wait untill connection to the Postgres container is ready

export PGPASSWORD=`cat /esg/config/.esg_pg_pass`

while ! psql -h esgf-postgres -U dbsuper -d esgcet -c "select 1" > /dev/null 2>&1; do
        echo 'Waiting for connection with postgres...'
        sleep 1;
done;
echo 'Connected to postgres...'