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: additionalProperties:
formFields: formFields:
- default: jhkdjhkjdhsIUTYURT - default: redis
envKey: PANEL_REDIS_ROOT_PASSWORD envKey: PANEL_REDIS_ROOT_PASSWORD
labelEn: Password labelEn: Password
labelZh: 密码 labelZh: 密码
random: true random: true
required: true required: false
rule: paramComplexity rule: paramComplexity
type: password type: password
- default: 6379 - default: 6379

View File

@ -7,7 +7,13 @@ services:
- 1panel-network - 1panel-network
ports: ports:
- ${PANEL_APP_PORT_HTTP}:6379 - ${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: volumes:
- ./data:/data - ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf - ./conf/redis.conf:/etc/redis/redis.conf

View File

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

View File

@ -7,7 +7,13 @@ services:
- 1panel-network - 1panel-network
ports: ports:
- ${PANEL_APP_PORT_HTTP}:6379 - ${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: volumes:
- ./data:/data - ./data:/data
- ./conf/redis.conf:/etc/redis/redis.conf - ./conf/redis.conf:/etc/redis/redis.conf

View File

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