[Redis] Add support for masterauth via env var

This commit is contained in:
FreddleSpl0it 2025-02-18 11:16:06 +01:00
parent a567d5dc31
commit 351f4ce787
No known key found for this signature in database
GPG key ID: 00E14E7634F4BEC5
2 changed files with 5 additions and 0 deletions

View file

@ -5,4 +5,8 @@ requirepass $REDISPASS
user quota_notify on nopass ~QW_* -@all +get +hget +ping
EOF
if [ -n "$REDISMASTERPASS" ]; then
echo "masterauth $REDISMASTERPASS" >> /redis.conf
fi
exec redis-server /redis.conf

View file

@ -55,6 +55,7 @@ services:
environment:
- TZ=${TZ}
- REDISPASS=${REDISPASS}
- REDISMASTERPASS=${REDISMASTERPASS:-}
sysctls:
- net.core.somaxconn=4096
networks: