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
|
DB_READY=false
|
||||||
I=1
|
I=1
|
||||||
while [ "$I" -le 30 ]; do
|
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
|
DB_READY=true
|
||||||
info "PostgreSQL is ready"
|
info "PostgreSQL is ready"
|
||||||
break
|
break
|
||||||
@@ -269,7 +269,7 @@ echo "=== CHECKPOINT: after postgres loop ==="
|
|||||||
|
|
||||||
info "Waiting for Redis..."
|
info "Waiting for Redis..."
|
||||||
for ((i=1; i<=15; i++)); do
|
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"
|
info "Redis is ready"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user