-
redis.conf
confacllog-max-len 128 requirepass 密码 lazyfree-lazy-eviction no lazyfree-lazy-expire no lazyfree-lazy-server-del no replica-lazy-flush no lazyfree-lazy-user-del no lazyfree-lazy-user-flush no oom-score-adj no oom-score-adj-values 0 200 800 disable-thp yes appendonly no appendfilename "appendonly.aof" appendfsync everysec no-appendfsync-on-rewrite no auto-aof-rewrite-percentage 100 auto-aof-rewrite-min-size 64mb aof-load-truncated yes aof-use-rdb-preamble yes lua-time-limit 5000 slowlog-log-slower-than 10000 slowlog-max-len 128 latency-monitor-threshold 0 notify-keyspace-events "" hash-max-ziplist-entries 512 hash-max-ziplist-value 64 list-max-ziplist-size -2 list-compress-depth 0 set-max-intset-entries 512 zset-max-ziplist-entries 128 zset-max-ziplist-value 64 -
docker-compose.yml
ymlversion: '3' services: redis: image: redis:8.4.0 container_name: redis_all ports: - 6379:6379 volumes: - ./redis.conf:/etc/redis/redis.conf - ./data:/data restart: always privileged: true # 获取宿主机root权限 command: ["redis-server","/etc/redis/redis.conf"] # 指定配置文件启动redis-server进程 -
docker compose up -d
docker-compose安装Redis
宋情写2026-01-18 15:23
相关推荐
梦梦代码精1 小时前
基于ThinkPHP6 + Vue3的家政预约系统全解析:从LBS定位到自动派单的完整实现小的博客2 小时前
windows下安装Docker Desptop李迟2 小时前
我的docker随笔48:Docker版本号演进史Zhu7582 小时前
在k8s环境部署Apache zookeeper3.9.5,高可用,多podYDS8293 小时前
大营销平台 —— 活动SKU库存扣减业务及其一致性处理阿拉雷️3 小时前
部署实战】Docker + AI Agent:让AI一键部署Spring Boot到服务器,从打包到上线只要一条指令雨声不在3 小时前
macos 12使用docker运维大师4 小时前
【K8S 运维实战】07-Pod生命周期与故障排查爬也要爬着前进17 小时前
redis主从搭建BullSmall18 小时前
Anolis OS 8.10 完整安装 Docker CE(生产可用,解决 podman 冲突)