diff --git a/Containers/redis/healthcheck.sh b/Containers/redis/healthcheck.sh index 6588229f..b4c47735 100644 --- a/Containers/redis/healthcheck.sh +++ b/Containers/redis/healthcheck.sh @@ -1,3 +1,7 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + redis-cli -a "$REDIS_HOST_PASSWORD" PING || exit 1 diff --git a/Containers/redis/start.sh b/Containers/redis/start.sh index 5454e468..262cbb90 100644 --- a/Containers/redis/start.sh +++ b/Containers/redis/start.sh @@ -1,5 +1,16 @@ #!/bin/bash +if [ "$AIO_LOG_LEVEL" = 'debug' ]; then + set -x +fi + +if [ "$AIO_LOG_LEVEL" = "warn" ]; then + REDIS_LOG_LEVEL="warning" +else + REDIS_LOG_LEVEL="$AIO_LOG_LEVEL" +fi +export REDIS_LOG_LEVEL + # Show wiki if vm.overcommit is disabled if [ "$(sysctl -n vm.overcommit_memory)" != "1" ]; then echo "Memory overcommit is disabled but necessary for safe operation" @@ -16,7 +27,7 @@ fi # Build the redis-server argument list. REDIS_ARGS=( - --loglevel warning + --loglevel "$REDIS_LOG_LEVEL" --save "" # Disable RDB persistence (Redis is used as a pure cache/lock store) --maxmemory-policy allkeys-lru # Evict least-recently-used keys when memory is full --lazyfree-lazy-eviction yes # Perform evictions in a background thread