Merge branch 'docker-redis-config' into 'master'

Default redis configuration for docker setup

See merge request allianceauth/allianceauth!1787
This commit is contained in:
Sava Georgiev
2026-01-21 18:57:06 +00:00
2 changed files with 14 additions and 1 deletions

12
docker/conf/redis.conf Normal file
View File

@@ -0,0 +1,12 @@
# Set the maximum memory usage
maxmemory 2GB
# Evict old keys instead of growing
maxmemory-policy allkeys-lru
# Disable disk persistence
appendonly no
save ""
# Optional: reduce fragmentation
activedefrag yes

View File

@@ -78,10 +78,11 @@ services:
redis:
image: redis:8
command: redis-server
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
restart: always
volumes:
- "redis-data:/data"
- ./conf/redis.conf:/usr/local/etc/redis/redis.conf:ro
- ./conf/redis_healthcheck.sh:/usr/local/bin/redis_healthcheck.sh
healthcheck:
test: ["CMD", "/usr/local/bin/redis_healthcheck.sh"]