mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
fix: postgres waiting script
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Wait for database to be ready
|
# Wait for database to be ready using psql and DATABASE_URL
|
||||||
echo "Waiting for PostgreSQL to be ready..."
|
echo "Waiting for PostgreSQL to be ready at $DATABASE_URL..."
|
||||||
until pg_isready -h postgres -p 5432 -U postgres; do
|
until PGPASSWORD="${PGPASSWORD:-}" psql "$DATABASE_URL" -c '\q' >/dev/null 2>&1; do
|
||||||
echo "PostgreSQL is unavailable - sleeping"
|
echo "PostgreSQL is unavailable - sleeping"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user