redis.yml
version: "2.4"
services:
redis:
image: redis:6.2.1
container_name: redis
environment:
- TZ=Asia/Shanghai
# - redisPWD=cl0udsuit1
privileged: true
pid: "host"
network_mode: "host"
volumes:
- /etc/hosts:/etc/hosts
- /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
- /opt/haihe/redis/redis.conf:/etc/redis.conf
- /var/lib/redis:/var/lib/redis
- /var/log/redis:/var/log/redis
command:
redis-server /etc/redis.conf
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
ports:
- "6379:6379"
restart: always
redis.conf
#分别填写内网IP
bind 0.0.0.0
#设置密码
#requirepass cl0udsuit1
#修改连接参数
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit slave 0 0 0
client-output-buffer-limit pubsub 0 0 0
标签:compose,buffer,redis,etc,limit,conf,var,docker
From: https://blog.csdn.net/tangsiqi130/article/details/137046528