From c1903f121d079d5cd32d6ecc10747f767362d73b Mon Sep 17 00:00:00 2001 From: FreddleSpl0it Date: Wed, 13 Nov 2024 16:48:30 +0100 Subject: [PATCH] [Redis] set password via docker-entrypoint.sh --- data/conf/redis/docker-entrypoint.sh | 6 ++++++ docker-compose.yml | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 data/conf/redis/docker-entrypoint.sh diff --git a/data/conf/redis/docker-entrypoint.sh b/data/conf/redis/docker-entrypoint.sh new file mode 100755 index 000000000..00bdab1b6 --- /dev/null +++ b/data/conf/redis/docker-entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +cat < /redis.conf +requirepass $REDISPASS +EOF +exec redis-server /redis.conf diff --git a/docker-compose.yml b/docker-compose.yml index ccb2a7271..6d32da7d0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -43,9 +43,10 @@ services: redis-mailcow: image: redis:7-alpine - command: '--requirepass ${REDISPASS}' + entrypoint: /docker-entrypoint.sh volumes: - redis-vol-1:/data/ + - ./data/conf/redis/docker-entrypoint.sh:/docker-entrypoint.sh:z restart: always depends_on: - netfilter-mailcow