This commit is contained in:
parent
e959d069f2
commit
69bd519fb4
1 changed files with 4 additions and 4 deletions
|
|
@ -50,14 +50,14 @@ steps:
|
|||
- name: wait_for_postgres
|
||||
image: docker.io/library/postgres:17.6
|
||||
commands:
|
||||
# Wait for postgres to become available
|
||||
# Wait for postgres to become available (POSIX-compatible)
|
||||
- |
|
||||
for i in {1..20}; do
|
||||
i=0
|
||||
while [ $i -lt 20 ]; do
|
||||
if pg_isready -h postgres -U postgres; then
|
||||
exit 0
|
||||
else
|
||||
true
|
||||
fi
|
||||
i=$((i + 1))
|
||||
sleep 2
|
||||
done
|
||||
echo "Postgres did not become available, aborting."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue