This commit is contained in:
V-LiuShuang
2026-08-14 13:52:09 +08:00
commit 609e3bf66e
29 changed files with 3793 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
## 目录结构
- docker-compose.yaml
- redis.conf
- data/
## docker-compose.yaml
```yaml
services:
redis:
image: redis:8.6 # 替换
container_name: redis
ports:
- "52358:6379" # 替换
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
- ./data:/data
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
restart: on-failure:3
```
## redis.conf
```text
bind 0.0.0.0
port 6379
requirepass 1965589280@Jkw!
protected-mode no
dir /data
save 900 1
save 300 10
save 60 10000
dbfilename dump.rdb
rdbcompression yes
rdbchecksum yes
appendonly yes
appendfilename "appendonly.aof"
appendfsync everysec
timeout 0
tcp-keepalive 300
loglevel notice
databases 16
daemonize no
supervised no
always-show-logo no
```