From 609751ff1029bbfd9de6c78df36d8195efcff4e8 Mon Sep 17 00:00:00 2001 From: Abhishek Dubey Date: Sun, 30 Oct 2022 22:44:29 +0530 Subject: [PATCH] [Development][Add] Added ipv6 support in redis image (#17) * Added ipv6 support in redis image Signed-off-by: iamabhishek-dubey * Fixed healthcheck for ipv6 as well Signed-off-by: iamabhishek-dubey * Added ipv6 block in bind Signed-off-by: iamabhishek-dubey Signed-off-by: iamabhishek-dubey --- Makefile | 17 +++++++++++++---- entrypoint.sh | 2 +- healthcheck.sh | 2 +- redis.conf | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index afaacf0..043b233 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,20 @@ REDIS_VERSION ?= v7.0.5 EXPORTER_VERSION ?= v1.44.0 -build-redis-image: - docker build -t quay.io/opstree/redis:$(REDIS_VERSION) -f Dockerfile . +IMG ?= quay.io/opstree/redis:$(REDIS_VERSION) +EXPORTER_IMG ?= opstree/redis-exporter:$(EXPORTER_VERSION) -build-redis-exporter-image: - docker build -t opstree/redis-exporter:$(EXPORTER_VERSION) -f Dockerfile.exporter . +build-redis: + docker build -t ${IMG} -f Dockerfile . + +push-redis: + docker push ${IMG} + +build-redis-exporter: + docker build -t ${EXPORTER_IMG} -f Dockerfile.exporter . + +push-redis-exporter: + docker push ${EXPORTER_IMG} setup-standalone-server-compose: docker-compose -f docker-compose-standalone.yaml up -d diff --git a/entrypoint.sh b/entrypoint.sh index f582657..5852b7f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,7 +4,7 @@ set -a PERSISTENCE_ENABLED=${PERSISTENCE_ENABLED:-"false"} DATA_DIR=${DATA_DIR:-"/data"} -EXTERNAL_CONFIG_FILE=${EXTERNAL_CONFIG_FILE:-"/etc/redis/external.conf.d/redis-external.conf"} +EXTERNAL_CONFIG_FILE=${EXTERNAL_CONFIG_FILE:-"/etc/redis/external.conf.d/redis-additional.conf"} REDIS_MAJOR_VERSION=${REDIS_MAJOR_VERSION:-"v7"} apply_permissions() { diff --git a/healthcheck.sh b/healthcheck.sh index a38d9b6..184ca1d 100755 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -7,7 +7,7 @@ check_redis_health() { if [[ "${TLS_MODE}" == "true" ]]; then redis-cli --tls --cert "${REDIS_TLS_CERT}" --key "${REDIS_TLS_CERT_KEY}" --cacert "${REDIS_TLS_CA_KEY}" -h "$(hostname)" ping else - redis-cli ping + redis-cli -h $(hostname) ping fi } diff --git a/redis.conf b/redis.conf index 0097fa9..1eab054 100755 --- a/redis.conf +++ b/redis.conf @@ -1,4 +1,4 @@ -bind 0.0.0.0 +bind 0.0.0.0 :: tcp-backlog 511 timeout 0 tcp-keepalive 300 -- 2.26.0