fix(docker): 修改 Redis 配置以支持可选的密码设置
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user