docker-compose.yml:

version: '2'
services:
#redis容器
redis:
#定义主机名
container_name: redis-single
#使用的镜像
image: redis
#容器的映射端口
ports:
- 6379:6379
command: redis-server /etc/conf/redis.conf
#定义挂载点
volumes:
- ./data:/data
- ./conf:/etc/conf
#环境变量
privileged: true
environment:
- TZ=Asia/Shanghai
- LANG=en_US.UTF-8

.conf/redis.conf:


bind 0.0.0.0
protected-mode no
port 6379
tcp-backlog 511
timeout 0
tcp-keepalive 300
daemonize no
pidfile /var/run/redis_6379.pid
loglevel notice
logfile ""
databases 16
always-show-logo no
set-proc-title yes
proc-title-template "{title} {listen-addr} {server-mode}"
stop-writes-on-bgsave-error yes
rdbcompression yes
rdbchecksum yes
dbfilename dump.rdb
rdb-del-sync-files no
dir ./
replica-serve-stale-data yes
replica-read-only yes
repl-diskless-sync no
repl-diskless-sync-delay 5
repl-diskless-load disabled
repl-disable-tcp-nodelay no
replica-priority 100
acllog-max-len 128
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
hll-sparse-max-bytes 3000
stream-node-max-bytes 4096
stream-node-max-entries 100
activerehashing yes
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
hz 10
dynamic-hz yes
aof-rewrite-incremental-fsync yes
rdb-save-incremental-fsync yes
jemalloc-bg-thread yes

最新文章

  1. APUE学习之三个特殊位 设置用户ID(set-user-ID),设置组ID(set-group-ID),sticky
  2. ASP.NET Core中的依赖注入(5): ServiceProvider实现揭秘 【解读ServiceCallSite 】
  3. Linux学习之二--搭建FTP服务器
  4. C++函数指针
  5. MontageJS:构建现代 Web App 的 HTML5 框架
  6. RFID应用范围
  7. jq 获取table元素,ajax 静态填加数据
  8. Magento PHP Extension "curl" must be loaded解决方法
  9. jquery选择器效率优化问题
  10. 2016年12月6日 星期二 --出埃及记 Exodus 21:1
  11. xll
  12. http://blog.csdn.net/wxwzy738/article/details/16968767
  13. jquery弹出关闭遮罩层实例
  14. HDU 4119Isabella's Message2011成都现场赛I题(字符串模拟)
  15. 文章13称号 Add Two Numbers
  16. 什么是Git?
  17. Linux——高效玩转命令行
  18. AEM上的一个图片转换工具
  19. Cannot set property 'innerHTML' of null
  20. 2019年19道java经典面试题(附答案)

热门文章

  1. LogAgent —— etcd+kafka+zookeeper+go实现实时读取日志发送到kafka,并实现热加载配置读取的日志路径
  2. 【安全记录】certutil实战使用总结
  3. 宿主机通过vmware创建的kali虚拟机连接redis,sftp等功能
  4. CompletableFuture事务问题
  5. sync.Once
  6. 手写g++编译命令行工具笔记
  7. JAVA的作用
  8. 小白之Python-基础中的基础01
  9. vue2中底层响应式数据实现
  10. Camstar代码:指定执行某函数