This commit is contained in:
k00kzaAntonovaIra
2026-11-25 20:16:24 +03:00
parent 20afc2c790
commit 9dcf5b1118
197 changed files with 21197 additions and 182 deletions
+12
View File
@@ -0,0 +1,12 @@
dir /data
appendonly yes
appendfsync always
maxmemory 256mb
maxmemory-policy noeviction
port 0
tls-port 6379
tls-cert-file /run/tls/server.crt
tls-key-file /run/tls/server.key
tls-ca-cert-file /run/tls/ca.crt
tls-auth-clients no
tls-protocols "TLSv1.2 TLSv1.3"
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
password_hash=$(tr -d '\r\n' </run/secrets/redis_password | sha256sum | cut -d ' ' -f 1)
mkdir -p /run/redis
umask 077
printf 'user session on #%s ~session:* +get +set +del +ping +hello +select +client|setinfo\n' "$password_hash" >/run/redis/users.acl
if [ -r /run/secrets/test_redis_password ]; then
test_hash=$(sha256sum </run/secrets/test_redis_password | cut -d ' ' -f 1)
printf 'user default reset on #%s ~* &* +@all\n' "$test_hash" >>/run/redis/users.acl
else
printf 'user default off\n' >>/run/redis/users.acl
fi
chown redis:redis /run/redis/users.acl
chmod 600 /run/redis/users.acl
exec /usr/local/bin/docker-entrypoint.sh redis-server /usr/local/etc/redis/redis.conf --aclfile /run/redis/users.acl