feat: 安装 Redis 允许密码为空 (#1500)

This commit is contained in:
wanghe 2024-05-30 17:39:04 +08:00 committed by GitHub
parent 08cec60af6
commit 630097a4e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 7 deletions

View File

@ -1,11 +1,11 @@
additionalProperties:
formFields:
- default: jhkdjhkjdhsIUTYURT
- default: redis
envKey: PANEL_REDIS_ROOT_PASSWORD
labelEn: Password
labelZh: 密码
random: true
required: true
required: false
rule: paramComplexity
type: password
- default: 6379

View File

@ -7,7 +7,13 @@ services:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:6379
command: redis-server /etc/redis/redis.conf --loglevel warning --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
command: >
sh -c '
if [ -z "${PANEL_REDIS_ROOT_PASSWORD}" ]; then
redis-server /etc/redis/redis.conf
else
redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
fi'
volumes:
- ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf

View File

@ -1,11 +1,11 @@
additionalProperties:
formFields:
- default: jhkdjhkjdhsIUTYURTU
- default: redis
envKey: PANEL_REDIS_ROOT_PASSWORD
labelEn: Password
labelZh: 密码
random: true
required: true
required: false
rule: paramComplexity
type: password
- default: 6379

View File

@ -7,7 +7,13 @@ services:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:6379
command: redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
command: >
sh -c '
if [ -z "${PANEL_REDIS_ROOT_PASSWORD}" ]; then
redis-server /etc/redis/redis.conf
else
redis-server /etc/redis/redis.conf --requirepass ${PANEL_REDIS_ROOT_PASSWORD}
fi'
volumes:
- ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf

View File

@ -12,7 +12,7 @@ additionalProperties:
shortDescEn: High-performance open-source key-value database
type: runtime
crossVersionUpdate: true
limit: 1
limit: 0
recommend: 4
website: https://redis.io/
github: https://github.com/redis/redis