From 7af22453bad2e5604a46c190c123c4f289b05b54 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期二, 23 十一月 2021 20:19:51 +0800 Subject: [PATCH] update 更新 redis.conf 存储策略 aof 与 rdb 配置参数 --- script/docker/docker-compose.yml | 4 ++-- script/docker/redis/redis.conf | 25 ++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/script/docker/docker-compose.yml b/script/docker/docker-compose.yml index c738a25..3782823 100644 --- a/script/docker/docker-compose.yml +++ b/script/docker/docker-compose.yml @@ -66,8 +66,8 @@ # 閰嶇疆鏂囦欢 - /docker/redis/conf:/redis/config:rw # 鏁版嵁鏂囦欢 - - /docker/redis/data:/redis/data:rw - command: "redis-server /redis/config/redis.conf --appendonly yes" + - /docker/redis/data/:/redis/data/:rw + command: "redis-server /redis/config/redis.conf" privileged: true restart: always networks: diff --git a/script/docker/redis/redis.conf b/script/docker/redis/redis.conf index 213e9ba..7d550e1 100644 --- a/script/docker/redis/redis.conf +++ b/script/docker/redis/redis.conf @@ -1,2 +1,25 @@ # redis 瀵嗙爜 -# requirepass 123456 \ No newline at end of file +# requirepass ruoyi123 + +# 閰嶇疆鎸佷箙鍖栨枃浠跺瓨鍌ㄨ矾寰� +dir /redis/data +# 閰嶇疆rdb +# 15鍒嗛挓鍐呮湁鑷冲皯1涓猭ey琚洿鏀瑰垯杩涜蹇収 +save 900 1 +# 5鍒嗛挓鍐呮湁鑷冲皯10涓猭ey琚洿鏀瑰垯杩涜蹇収 +save 300 10 +# 1鍒嗛挓鍐呮湁鑷冲皯10000涓猭ey琚洿鏀瑰垯杩涜蹇収 +save 60 10000 +# 寮�鍚帇缂� +rdbcompression yes +# rdb鏂囦欢鍚� 鐢ㄩ粯璁ょ殑鍗冲彲 +dbfilename dump.rdb + +# 寮�鍚痑of +appendonly yes +# 鏂囦欢鍚� +appendfilename "appendonly.aof" +# 鎸佷箙鍖栫瓥鐣�,no:涓嶅悓姝�,everysec:姣忕涓�娆�,always:鎬绘槸鍚屾,閫熷害姣旇緝鎱� +# appendfsync always +appendfsync everysec +# appendfsync no -- Gitblit v1.9.3