Files
integral-shop/deploy/docker/redis/redis.conf

40 lines
758 B
Plaintext
Raw Normal View History

# =============================================================
# Redis 6.2 — 容器内最小化生产配置
# 密码由 docker-compose 通过 --requirepass 参数注入
# =============================================================
bind 0.0.0.0
protected-mode yes
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
# 数据持久化: AOF + 一份 RDB 兜底
appendonly yes
appendfsync everysec
save 900 1
save 300 10
save 60 10000
dir /data
dbfilename dump.rdb
appendfilename "appendonly.aof"
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
# 内存策略
maxmemory 512mb
maxmemory-policy allkeys-lru
# 日志
loglevel notice
logfile ""
# 慢日志
slowlog-log-slower-than 10000
slowlog-max-len 128
# 客户端
maxclients 1000