serverctl/services/db/migrations/wait-for-database.sh

14 lines
228 B
Bash
Raw Permalink Normal View History

2022-02-14 20:03:53 +01:00
#!/bin/sh
# wait-for-postgres.sh
set -e
until tern status -c tern.docker.conf; do
>&2 echo "Postgres is unavailable - sleeping"
sleep 1
done
>&2 echo "Postgres is up - executing command"
tern migrate -c tern.docker.conf