From 700fe8118b2a1a5bdc435b2600615155b07fa285 Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Tue, 4 Nov 2025 19:24:06 +0100 Subject: [PATCH] fix(deployment): complete Redis health check fix - update entrypoint script variable syntax Previous fix (5f7ebd9) only updated health check line but missed entrypoint script. The entrypoint script was still using $$REDIS_PASSWORD (Docker Compose escaping) instead of $REDIS_PASSWORD (shell variable syntax). Changes: - Line 180: export REDIS_PASSWORD=$(cat ...) - now uses single $ - Line 182: if [ -n "$REDIS_PASSWORD" ] - now uses single $ - Line 190: --requirepass "$REDIS_PASSWORD" - now uses single $ Technical explanation: The command: block is a multi-line shell script passed to /bin/sh -c. Within this shell script context, we use normal shell variable syntax with single $ for variable references. The export statement makes REDIS_PASSWORD available to both the Redis process and the health check command. This completes the fix for: "container application-redis-1 is unhealthy" Related: 5f7ebd9 (health check fix), b1e3a00 (fallback strategy) --- docker-compose.production.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.production.yml b/docker-compose.production.yml index 82b9d728..73e35597 100644 --- a/docker-compose.production.yml +++ b/docker-compose.production.yml @@ -177,9 +177,9 @@ services: command: - | # Read password from Docker Secret (as root) and export for health check - export REDIS_PASSWORD=$$(cat /run/secrets/redis_password 2>/dev/null || echo '') + export REDIS_PASSWORD=$(cat /run/secrets/redis_password 2>/dev/null || echo '') # Start Redis with all settings as command line arguments (no config file to avoid conflicts) - if [ -n "$$REDIS_PASSWORD" ]; then + if [ -n "$REDIS_PASSWORD" ]; then exec redis-server \ --bind 0.0.0.0 \ --dir /data \ @@ -187,7 +187,7 @@ services: --save 300 10 \ --save 60 10000 \ --appendonly yes \ - --requirepass "$$REDIS_PASSWORD" + --requirepass "$REDIS_PASSWORD" else exec redis-server \ --bind 0.0.0.0 \