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