feat: 修改 halo 配置,为以后支持其他数据库做准备

This commit is contained in:
zhengkunwang223 2023-03-06 14:16:03 +08:00
parent 781d329b67
commit 93b21f7a41
12 changed files with 71 additions and 35 deletions

View File

@ -1,13 +1,39 @@
{
"formFields": [
{
"type": "service",
"key": "mysql",
"type": "apps",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "",
"envKey": "PANEL_DB_HOST"
"default": "mysql",
"values": [{
"label": "MySQL",
"value": "mysql"
}],
"envKey": "HALO_PLATFORM",
"child": {
"type": "service",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "",
"envKey": "PANEL_DB_HOST"
},
"params": [
{
"type": "param",
"key": "mysql",
"value": "3306",
"envKey": "HALO_DB_PORT"
},
{
"type": "param",
"key": "postgresql",
"value": "5432",
"envKey": "HALO_DB_PORT"
}
]
},
{
"type": "text",
@ -44,7 +70,7 @@
"labelZh": "超级管理员用户名",
"labelEn": "Admin Username",
"required": true,
"default": "halo",
"default": "admin",
"random": true,
"rule": "paramCommon",
"envKey": "HALO_ADMIN"

View File

@ -11,10 +11,10 @@ services:
ports:
- ${PANEL_APP_PORT_HTTP}:8090
command:
- --spring.r2dbc.url=r2dbc:pool:mysql://${PANEL_DB_HOST}:3306/${PANEL_DB_NAME}
- --spring.r2dbc.url=r2dbc:pool:${HALO_PLATFORM}://${PANEL_DB_HOST}:${HALO_DB_PORT}/${PANEL_DB_NAME}
- --spring.r2dbc.username=${PANEL_DB_USER}
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD}
- --spring.sql.init.platform=mysql
- --spring.sql.init.platform=${HALO_PLATFORM}
- --halo.external-url=${HALO_EXTERNAL_URL}
- --halo.security.initializer.superadminusername=${HALO_ADMIN}
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

View File

@ -1,13 +1,39 @@
{
"formFields": [
{
"type": "service",
"key": "mysql",
"type": "apps",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "",
"envKey": "PANEL_DB_HOST"
"default": "mysql",
"values": [{
"label": "MySQL",
"value": "mysql"
}],
"envKey": "HALO_PLATFORM",
"child": {
"type": "service",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "",
"envKey": "PANEL_DB_HOST"
},
"params": [
{
"type": "param",
"key": "mysql",
"value": "3306",
"envKey": "HALO_DB_PORT"
},
{
"type": "param",
"key": "postgresql",
"value": "5432",
"envKey": "HALO_DB_PORT"
}
]
},
{
"type": "text",

View File

@ -11,10 +11,10 @@ services:
ports:
- ${PANEL_APP_PORT_HTTP}:8090
command:
- --spring.r2dbc.url=r2dbc:pool:mysql://${PANEL_DB_HOST}:3306/${PANEL_DB_NAME}
- --spring.r2dbc.url=r2dbc:pool:${HALO_PLATFORM}://${PANEL_DB_HOST}:${HALO_DB_PORT}/${PANEL_DB_NAME}
- --spring.r2dbc.username=${PANEL_DB_USER}
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD}
- --spring.sql.init.platform=mysql
- --spring.sql.init.platform=${HALO_PLATFORM}
- --halo.external-url=${HALO_EXTERNAL_URL}
- --halo.security.initializer.superadminusername=${HALO_ADMIN}
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

View File

@ -31,7 +31,6 @@
"shortDescZh": "开源关系型数据库管理系统",
"shortDescEn": "Open source relational database management system",
"type": "runtime",
"required": [],
"crossVersionUpdate": false,
"limit": 1,
"recommend": 4,
@ -47,7 +46,6 @@
"shortDescZh": "基于 Nginx 和 LuaJIT 的高性能 Web 平台",
"shortDescEn": "High performance web platform based on Nginx and LuaJIT",
"type": "runtime",
"required": [],
"limit": 1,
"crossVersionUpdate": true,
"recommend": 3,
@ -63,7 +61,6 @@
"shortDescZh": "开源博客软件和内容管理系统",
"shortDescEn": "Open source blogging software and content management system",
"type": "website",
"required": ["mysql"],
"recommend": 1,
"limit": 0,
"crossVersionUpdate": true,
@ -79,7 +76,6 @@
"shortDescZh": "高性能的 key-value 数据库",
"shortDescEn": "High-performance key-value database",
"type": "runtime",
"required": [],
"limit": 1,
"crossVersionUpdate": true,
"website": "https://redis.io/",
@ -94,7 +90,6 @@
"shortDescZh": "强大易用的开源建站工具",
"shortDescEn": "Powerful and easy-to-use open source website builder",
"type": "website",
"required": ["mysql"],
"limit": 0,
"recommend": 2,
"crossVersionUpdate": true,
@ -110,7 +105,6 @@
"shortDescZh": "MySQL 数据库管理工具",
"shortDescEn": "MySQL database management tools",
"type": "tool",
"required": ["mysql"],
"limit": 1,
"crossVersionUpdate": true,
"website": "https://www.phpmyadmin.net/",
@ -125,7 +119,6 @@
"shortDescZh": "Redis web 管理工具",
"shortDescEn": "Redis web management tool",
"type": "tool",
"required": ["redis"],
"limit": 1,
"crossVersionUpdate": true,
"website": "http://joeferner.github.io/redis-commander/",
@ -140,7 +133,6 @@
"shortDescZh": "开源的对象存储服务器",
"shortDescEn": "Open source object storage server",
"type": "tool",
"required": [],
"limit": 1,
"crossVersionUpdate": true,
"website": "https://min.io/download",
@ -155,7 +147,6 @@
"shortDescZh": "人人可用的开源数据可视化分析工具",
"shortDescEn": "Open source data visualization and analysis tools available to everyone",
"type": "tool",
"required": [],
"limit": 1,
"recommend": 5,
"crossVersionUpdate": true,
@ -171,7 +162,6 @@
"shortDescZh": "构建伟大,无所不能",
"shortDescEn": "Build great things at any scale",
"type": "tool",
"required": [],
"limit": 1,
"crossVersionUpdate": false,
"website": "https://www.jenkins.io/",
@ -186,7 +176,6 @@
"shortDescZh": "项目管理和代码托管平台",
"shortDescEn": "Project management and code hosting platform",
"type": "tool",
"required": [],
"limit": 1,
"crossVersionUpdate": false,
"website": "https://about.gitlab.com/",
@ -201,7 +190,6 @@
"shortDescZh": "开源关系型数据库",
"shortDescEn": "Open Source Relational Database",
"type": "runtime",
"required": [],
"limit": 1,
"crossVersionUpdate": false,
"website": "https://www.postgresql.org/",
@ -216,7 +204,6 @@
"shortDescZh": "分布式文件存储数据库",
"shortDescEn": "Fractional file storage database",
"type": "runtime",
"required": [],
"limit": 1,
"crossVersionUpdate": false,
"website": "https://www.mongodb.com/",
@ -231,7 +218,6 @@
"shortDescZh": "MYSQL 复刻版",
"shortDescEn": "The open source relational database",
"type": "runtime",
"required": [],
"crossVersionUpdate": false,
"limit": 1,
"website": "https://mariadb.org/",
@ -246,7 +232,6 @@
"shortDescZh": "Docker 镜像的存储和分发系统",
"shortDescEn": "A storage and distribution system for named Docker images",
"type": "runtime",
"required": [],
"crossVersionUpdate": false,
"limit": 1,
"website": "https://hub.docker.com/_/registry",
@ -261,7 +246,6 @@
"shortDescZh": "开源存储库",
"shortDescEn": "An open source repository for build artifacts",
"type": "runtime",
"required": [],
"crossVersionUpdate": false,
"limit": 1,
"website": "https://www.sonatype.com/products/nexus-repository",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -3,7 +3,7 @@
{
"type": "password",
"labelZh": "root用户密码",
"labelEn": "RootPassword",
"labelEn": "Root Password",
"required": true,
"default": "mysql",
"random": true,

View File

@ -7,7 +7,7 @@
"required": true,
"default": "mysql",
"random": true,
"rule": "paramCommon",
"rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD"
},
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -5,7 +5,7 @@
"labelZh": "用户名",
"labelEn": "Username",
"required": true,
"default": "pg",
"default": "user",
"random": true,
"rule": "paramCommon",
"envKey": "PANEL_DB_ROOT_USER"
@ -15,7 +15,7 @@
"labelZh": "用户密码",
"labelEn": "Password",
"required": true,
"default": "pg",
"default": "password",
"random": true,
"rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD"

View File

@ -5,7 +5,7 @@
"labelZh": "密码",
"labelEn": "Password",
"required": true,
"default": "jhkdjhkjdhsIUTYURTUYGHJGFFJ",
"default": "jhkdjhkjdhsIUTYURT",
"random": true,
"rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD"

View File

@ -5,7 +5,7 @@
"labelZh": "密码",
"labelEn": "Password",
"required": true,
"default": "jhkdjhkjdhsIUTYURTUYGHJGFFJ",
"default": "jhkdjhkjdhsIUTYURTU",
"random": true,
"rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD"