Commit 27291f2e authored by shaw's avatar shaw
Browse files

fix(docker): 修改 Redis 配置以支持可选的密码设置

parent 5d1badfe
...@@ -173,11 +173,12 @@ services: ...@@ -173,11 +173,12 @@ services:
volumes: volumes:
- redis_data:/data - redis_data:/data
command: > command: >
redis-server sh -c '
--save 60 1 redis-server
--appendonly yes --save 60 1
--appendfsync everysec --appendonly yes
${REDIS_PASSWORD:+--requirepass ${REDIS_PASSWORD}} --appendfsync everysec
${REDIS_PASSWORD:+--requirepass "$REDIS_PASSWORD"}'
environment: environment:
- TZ=${TZ:-Asia/Shanghai} - TZ=${TZ:-Asia/Shanghai}
# REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag) # REDISCLI_AUTH is used by redis-cli for authentication (safer than -a flag)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment