fix: add Redis password authentication support in health check
The health check script was not using the REDIS_HOST_PASSWORD environment variable when checking Redis connectivity, causing failures when Redis is password-protected. Now properly detects and uses the password from .env when available. Also includes minor cleanup in backup.sh (formatting and redundant log removal). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -152,10 +152,18 @@ echo ""
|
||||
|
||||
# 6. Vérifier Redis
|
||||
echo "▶ Cache Redis:"
|
||||
if docker-compose exec -T redis redis-cli ping 2>/dev/null | grep -q "PONG"; then
|
||||
check_ok "Redis répond"
|
||||
if [ -n "${REDIS_HOST_PASSWORD:-}" ]; then
|
||||
if docker-compose exec -T redis redis-cli -a "$REDIS_HOST_PASSWORD" ping 2>/dev/null | grep -q "PONG"; then
|
||||
check_ok "Redis répond (avec authentification)"
|
||||
else
|
||||
check_fail "Redis ne répond pas ou mot de passe incorrect"
|
||||
fi
|
||||
else
|
||||
check_fail "Redis ne répond pas"
|
||||
if docker-compose exec -T redis redis-cli ping 2>/dev/null | grep -q "PONG"; then
|
||||
check_ok "Redis répond (sans authentification)"
|
||||
else
|
||||
check_fail "Redis ne répond pas"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user