perf(redis): 增强持久化与优雅停止
This commit is contained in:
@@ -231,6 +231,7 @@ services:
|
||||
- ./redis.conf:/etc/redis/redis.conf # 挂载本地 redis.conf
|
||||
- ./data/redis:/data # 持久化 Redis AOF/RDB,避免落到容器写层
|
||||
command: [ "redis-server", "/etc/redis/redis.conf" ] # 让 Redis 读取配置文件
|
||||
stop_grace_period: 1m # 给 Redis 足够时间在 SIGTERM 后完成 AOF fsync
|
||||
mem_limit: 2g
|
||||
memswap_limit: 2g
|
||||
# ports:
|
||||
|
||||
Reference in New Issue
Block a user