mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-10-17 05:14:19 +02:00
fix(install): time out Redis readiness probes
This commit is contained in:
parent
447b174832
commit
5e69350b55
|
|
@ -19,7 +19,7 @@ REDIS_HOST="${REDIS_HOST:-redis}"
|
|||
REDIS_PORT="${REDIS_PORT:-6379}"
|
||||
echo "Waiting for Redis at ${REDIS_HOST}:${REDIS_PORT}..."
|
||||
for i in $(seq 1 60); do
|
||||
if node -e "const net=require('net');const s=net.connect(Number(process.env.REDIS_PORT||6379),process.env.REDIS_HOST||'redis');s.on('connect',()=>{s.end();process.exit(0)});s.on('error',()=>process.exit(1));" 2>/dev/null; then
|
||||
if node -e "const net=require('net');const s=net.connect(Number(process.env.REDIS_PORT||6379),process.env.REDIS_HOST||'redis');let done=false;const finish=(code)=>{if(done)return;done=true;s.destroy();process.exit(code)};s.setTimeout(1000,()=>finish(1));s.on('connect',()=>finish(0));s.on('error',()=>finish(1));" 2>/dev/null; then
|
||||
echo "Redis is up and running!"
|
||||
break
|
||||
fi
|
||||
|
|
@ -44,4 +44,4 @@ node ace queue:work --all &
|
|||
|
||||
# Start the AdonisJS application
|
||||
echo "Starting AdonisJS application..."
|
||||
exec node bin/server.js
|
||||
exec node bin/server.js
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user