feat: redis-commander 增加登录用户名密码配置

This commit is contained in:
zhengkunwang223 2023-03-18 00:15:28 +08:00
parent 23d6c11f25
commit dca11296bc
6 changed files with 53 additions and 28 deletions

View File

@ -42,7 +42,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "PANEL_DB_NAME", "envKey": "PANEL_DB_NAME"
}, },
{ {
"type": "text", "type": "text",
@ -52,7 +52,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "PANEL_DB_USER", "envKey": "PANEL_DB_USER"
}, },
{ {
"type": "password", "type": "password",
@ -62,7 +62,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramComplexity", "rule": "paramComplexity",
"envKey": "PANEL_DB_USER_PASSWORD", "envKey": "PANEL_DB_USER_PASSWORD"
}, },
{ {
"type": "text", "type": "text",
@ -72,7 +72,7 @@
"default": "admin", "default": "admin",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "HALO_ADMIN", "envKey": "HALO_ADMIN"
}, },
{ {
"type": "password", "type": "password",
@ -82,7 +82,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramComplexity", "rule": "paramComplexity",
"envKey": "HALO_ADMIN_PASSWORD", "envKey": "HALO_ADMIN_PASSWORD"
}, },
{ {
"type": "text", "type": "text",

View File

@ -42,7 +42,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "PANEL_DB_NAME", "envKey": "PANEL_DB_NAME"
}, },
{ {
"type": "text", "type": "text",
@ -52,7 +52,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "PANEL_DB_USER", "envKey": "PANEL_DB_USER"
}, },
{ {
"type": "password", "type": "password",
@ -62,7 +62,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramComplexity", "rule": "paramComplexity",
"envKey": "PANEL_DB_USER_PASSWORD", "envKey": "PANEL_DB_USER_PASSWORD"
}, },
{ {
"type": "text", "type": "text",
@ -72,7 +72,7 @@
"default": "admin", "default": "admin",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "HALO_ADMIN", "envKey": "HALO_ADMIN"
}, },
{ {
"type": "password", "type": "password",
@ -82,7 +82,7 @@
"default": "halo", "default": "halo",
"random": true, "random": true,
"rule": "paramComplexity", "rule": "paramComplexity",
"envKey": "HALO_ADMIN_PASSWORD", "envKey": "HALO_ADMIN_PASSWORD"
}, },
{ {
"type": "text", "type": "text",

View File

@ -115,7 +115,7 @@
"key": "redis-commander", "key": "redis-commander",
"name": "Redis-Commander", "name": "Redis-Commander",
"tags": ["Tool"], "tags": ["Tool"],
"versions": ["0.8.0"], "versions": ["0.8.1"],
"shortDescZh": "Redis web 管理工具", "shortDescZh": "Redis web 管理工具",
"shortDescEn": "Redis web management tool", "shortDescEn": "Redis web management tool",
"type": "tool", "type": "tool",

View File

@ -17,6 +17,28 @@
"default": "", "default": "",
"envKey": "PANEL_DB_ROOT_PASSWORD" "envKey": "PANEL_DB_ROOT_PASSWORD"
}, },
{
"type": "text",
"labelZh": "登录用户名",
"labelEn": "Username",
"required": true,
"default": "root",
"random": true,
"rule": "paramCommon",
"envKey": "COMMANDER_ADMIN",
"edit": true
},
{
"type": "text",
"labelZh": "登录密码",
"labelEn": "Password",
"required": true,
"default": "P@ssword@redis",
"random": true,
"rule": "paramComplexity",
"envKey": "COMMANDER_PASSWORD",
"edit": true
},
{ {
"type": "number", "type": "number",
"labelZh": "端口", "labelZh": "端口",
@ -24,7 +46,8 @@
"required": true, "required": true,
"default": 8089, "default": 8089,
"rule": "paramPort", "rule": "paramPort",
"envKey": "PANEL_APP_PORT_HTTP" "envKey": "PANEL_APP_PORT_HTTP",
"edit": true
} }
] ]
} }

View File

@ -1,18 +1,20 @@
version: '3'
services:
redis-commander:
container_name: ${CONTAINER_NAME}
hostname: redis-commander
image: rediscommander/redis-commander:latest
restart: always
networks:
- 1panel-network
environment:
- REDIS_HOSTS=1panel:${PANEL_DB_HOST}:6379:0:${PANEL_DB_ROOT_PASSWORD}
ports:
- ${PANEL_APP_PORT_HTTP}:8081
labels:
createdBy: "Apps"
networks: networks:
1panel-network: 1panel-network:
external: true external: true
services:
redis-commander-XnlR:
container_name: ${CONTAINER_NAME}
environment:
- REDIS_HOSTS=1panel:${PANEL_DB_HOST}:6379:0:${PANEL_DB_ROOT_PASSWORD}
- HTTP_USER=${COMMANDER_ADMIN}
- HTTP_PASSWORD=${COMMANDER_PASSWORD}
hostname: redis-commander
image: rediscommander/redis-commander:latest
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:8081
restart: always
version: "3"