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,14 +1,40 @@
{ {
"formFields": [ "formFields": [
{ {
"type": "apps",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "mysql",
"values": [{
"label": "MySQL",
"value": "mysql"
}],
"envKey": "HALO_PLATFORM",
"child": {
"type": "service", "type": "service",
"key": "mysql",
"labelZh": "数据库服务", "labelZh": "数据库服务",
"labelEn": "Database Service", "labelEn": "Database Service",
"required": true, "required": true,
"default": "", "default": "",
"envKey": "PANEL_DB_HOST" "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", "type": "text",
"labelZh": "数据库名", "labelZh": "数据库名",
@ -44,7 +70,7 @@
"labelZh": "超级管理员用户名", "labelZh": "超级管理员用户名",
"labelEn": "Admin Username", "labelEn": "Admin Username",
"required": true, "required": true,
"default": "halo", "default": "admin",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "HALO_ADMIN" "envKey": "HALO_ADMIN"

View File

@ -11,10 +11,10 @@ services:
ports: ports:
- ${PANEL_APP_PORT_HTTP}:8090 - ${PANEL_APP_PORT_HTTP}:8090
command: 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.username=${PANEL_DB_USER}
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD} - --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.external-url=${HALO_EXTERNAL_URL}
- --halo.security.initializer.superadminusername=${HALO_ADMIN} - --halo.security.initializer.superadminusername=${HALO_ADMIN}
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD} - --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

View File

@ -1,14 +1,40 @@
{ {
"formFields": [ "formFields": [
{ {
"type": "apps",
"labelZh": "数据库服务",
"labelEn": "Database Service",
"required": true,
"default": "mysql",
"values": [{
"label": "MySQL",
"value": "mysql"
}],
"envKey": "HALO_PLATFORM",
"child": {
"type": "service", "type": "service",
"key": "mysql",
"labelZh": "数据库服务", "labelZh": "数据库服务",
"labelEn": "Database Service", "labelEn": "Database Service",
"required": true, "required": true,
"default": "", "default": "",
"envKey": "PANEL_DB_HOST" "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", "type": "text",
"labelZh": "数据库名", "labelZh": "数据库名",

View File

@ -11,10 +11,10 @@ services:
ports: ports:
- ${PANEL_APP_PORT_HTTP}:8090 - ${PANEL_APP_PORT_HTTP}:8090
command: 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.username=${PANEL_DB_USER}
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD} - --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.external-url=${HALO_EXTERNAL_URL}
- --halo.security.initializer.superadminusername=${HALO_ADMIN} - --halo.security.initializer.superadminusername=${HALO_ADMIN}
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD} - --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

View File

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

View File

@ -7,7 +7,7 @@
"required": true, "required": true,
"default": "mysql", "default": "mysql",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD" "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": "用户名", "labelZh": "用户名",
"labelEn": "Username", "labelEn": "Username",
"required": true, "required": true,
"default": "pg", "default": "user",
"random": true, "random": true,
"rule": "paramCommon", "rule": "paramCommon",
"envKey": "PANEL_DB_ROOT_USER" "envKey": "PANEL_DB_ROOT_USER"
@ -15,7 +15,7 @@
"labelZh": "用户密码", "labelZh": "用户密码",
"labelEn": "Password", "labelEn": "Password",
"required": true, "required": true,
"default": "pg", "default": "password",
"random": true, "random": true,
"rule": "paramComplexity", "rule": "paramComplexity",
"envKey": "PANEL_DB_ROOT_PASSWORD" "envKey": "PANEL_DB_ROOT_PASSWORD"

View File

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

View File

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