fix: redirect stdin of docker compose exec to /dev/null to prevent stealing script pipe
This commit is contained in:
@@ -252,7 +252,7 @@ info "Waiting for PostgreSQL (up to 60s)..."
|
||||
DB_READY=false
|
||||
I=1
|
||||
while [ "$I" -le 30 ]; do
|
||||
if $SUDO docker compose exec -T postgres pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" >/dev/null 2>&1; then
|
||||
if $SUDO docker compose exec -T postgres pg_isready -U "${POSTGRES_USER}" -d "${POSTGRES_DB}" </dev/null >/dev/null 2>&1; then
|
||||
DB_READY=true
|
||||
info "PostgreSQL is ready"
|
||||
break
|
||||
@@ -269,7 +269,7 @@ echo "=== CHECKPOINT: after postgres loop ==="
|
||||
|
||||
info "Waiting for Redis..."
|
||||
for ((i=1; i<=15; i++)); do
|
||||
if $SUDO docker compose exec -T redis redis-cli ping 2>/dev/null | grep -q PONG; then
|
||||
if $SUDO docker compose exec -T redis redis-cli ping </dev/null 2>/dev/null | grep -q PONG; then
|
||||
info "Redis is ready"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user