Skip to content

Commit 93b21f7

Browse files
feat: 修改 halo 配置,为以后支持其他数据库做准备
1 parent 781d329 commit 93b21f7

File tree

12 files changed

+71
-35
lines changed

12 files changed

+71
-35
lines changed

apps/halo/versions/2.2.0/config.json

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
{
2+
23
"formFields": [
34
{
4-
"type": "service",
5-
"key": "mysql",
5+
"type": "apps",
66
"labelZh": "数据库服务",
77
"labelEn": "Database Service",
88
"required": true,
9-
"default": "",
10-
"envKey": "PANEL_DB_HOST"
9+
"default": "mysql",
10+
"values": [{
11+
"label": "MySQL",
12+
"value": "mysql"
13+
}],
14+
"envKey": "HALO_PLATFORM",
15+
"child": {
16+
"type": "service",
17+
"labelZh": "数据库服务",
18+
"labelEn": "Database Service",
19+
"required": true,
20+
"default": "",
21+
"envKey": "PANEL_DB_HOST"
22+
},
23+
"params": [
24+
{
25+
"type": "param",
26+
"key": "mysql",
27+
"value": "3306",
28+
"envKey": "HALO_DB_PORT"
29+
},
30+
{
31+
"type": "param",
32+
"key": "postgresql",
33+
"value": "5432",
34+
"envKey": "HALO_DB_PORT"
35+
}
36+
]
1137
},
1238
{
1339
"type": "text",
@@ -44,7 +70,7 @@
4470
"labelZh": "超级管理员用户名",
4571
"labelEn": "Admin Username",
4672
"required": true,
47-
"default": "halo",
73+
"default": "admin",
4874
"random": true,
4975
"rule": "paramCommon",
5076
"envKey": "HALO_ADMIN"

apps/halo/versions/2.2.0/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ services:
1111
ports:
1212
- ${PANEL_APP_PORT_HTTP}:8090
1313
command:
14-
- --spring.r2dbc.url=r2dbc:pool:mysql://${PANEL_DB_HOST}:3306/${PANEL_DB_NAME}
14+
- --spring.r2dbc.url=r2dbc:pool:${HALO_PLATFORM}://${PANEL_DB_HOST}:${HALO_DB_PORT}/${PANEL_DB_NAME}
1515
- --spring.r2dbc.username=${PANEL_DB_USER}
1616
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD}
17-
- --spring.sql.init.platform=mysql
17+
- --spring.sql.init.platform=${HALO_PLATFORM}
1818
- --halo.external-url=${HALO_EXTERNAL_URL}
1919
- --halo.security.initializer.superadminusername=${HALO_ADMIN}
2020
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

apps/halo/versions/2.3.0/config.json

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
{
2+
23
"formFields": [
34
{
4-
"type": "service",
5-
"key": "mysql",
5+
"type": "apps",
66
"labelZh": "数据库服务",
77
"labelEn": "Database Service",
88
"required": true,
9-
"default": "",
10-
"envKey": "PANEL_DB_HOST"
9+
"default": "mysql",
10+
"values": [{
11+
"label": "MySQL",
12+
"value": "mysql"
13+
}],
14+
"envKey": "HALO_PLATFORM",
15+
"child": {
16+
"type": "service",
17+
"labelZh": "数据库服务",
18+
"labelEn": "Database Service",
19+
"required": true,
20+
"default": "",
21+
"envKey": "PANEL_DB_HOST"
22+
},
23+
"params": [
24+
{
25+
"type": "param",
26+
"key": "mysql",
27+
"value": "3306",
28+
"envKey": "HALO_DB_PORT"
29+
},
30+
{
31+
"type": "param",
32+
"key": "postgresql",
33+
"value": "5432",
34+
"envKey": "HALO_DB_PORT"
35+
}
36+
]
1137
},
1238
{
1339
"type": "text",

apps/halo/versions/2.3.0/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ services:
1111
ports:
1212
- ${PANEL_APP_PORT_HTTP}:8090
1313
command:
14-
- --spring.r2dbc.url=r2dbc:pool:mysql://${PANEL_DB_HOST}:3306/${PANEL_DB_NAME}
14+
- --spring.r2dbc.url=r2dbc:pool:${HALO_PLATFORM}://${PANEL_DB_HOST}:${HALO_DB_PORT}/${PANEL_DB_NAME}
1515
- --spring.r2dbc.username=${PANEL_DB_USER}
1616
- --spring.r2dbc.password=${PANEL_DB_USER_PASSWORD}
17-
- --spring.sql.init.platform=mysql
17+
- --spring.sql.init.platform=${HALO_PLATFORM}
1818
- --halo.external-url=${HALO_EXTERNAL_URL}
1919
- --halo.security.initializer.superadminusername=${HALO_ADMIN}
2020
- --halo.security.initializer.superadminpassword=${HALO_ADMIN_PASSWORD}

apps/list.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"shortDescZh": "开源关系型数据库管理系统",
3232
"shortDescEn": "Open source relational database management system",
3333
"type": "runtime",
34-
"required": [],
3534
"crossVersionUpdate": false,
3635
"limit": 1,
3736
"recommend": 4,
@@ -47,7 +46,6 @@
4746
"shortDescZh": "基于 Nginx 和 LuaJIT 的高性能 Web 平台",
4847
"shortDescEn": "High performance web platform based on Nginx and LuaJIT",
4948
"type": "runtime",
50-
"required": [],
5149
"limit": 1,
5250
"crossVersionUpdate": true,
5351
"recommend": 3,
@@ -63,7 +61,6 @@
6361
"shortDescZh": "开源博客软件和内容管理系统",
6462
"shortDescEn": "Open source blogging software and content management system",
6563
"type": "website",
66-
"required": ["mysql"],
6764
"recommend": 1,
6865
"limit": 0,
6966
"crossVersionUpdate": true,
@@ -79,7 +76,6 @@
7976
"shortDescZh": "高性能的 key-value 数据库",
8077
"shortDescEn": "High-performance key-value database",
8178
"type": "runtime",
82-
"required": [],
8379
"limit": 1,
8480
"crossVersionUpdate": true,
8581
"website": "https://redis.io/",
@@ -94,7 +90,6 @@
9490
"shortDescZh": "强大易用的开源建站工具",
9591
"shortDescEn": "Powerful and easy-to-use open source website builder",
9692
"type": "website",
97-
"required": ["mysql"],
9893
"limit": 0,
9994
"recommend": 2,
10095
"crossVersionUpdate": true,
@@ -110,7 +105,6 @@
110105
"shortDescZh": "MySQL 数据库管理工具",
111106
"shortDescEn": "MySQL database management tools",
112107
"type": "tool",
113-
"required": ["mysql"],
114108
"limit": 1,
115109
"crossVersionUpdate": true,
116110
"website": "https://www.phpmyadmin.net/",
@@ -125,7 +119,6 @@
125119
"shortDescZh": "Redis web 管理工具",
126120
"shortDescEn": "Redis web management tool",
127121
"type": "tool",
128-
"required": ["redis"],
129122
"limit": 1,
130123
"crossVersionUpdate": true,
131124
"website": "http://joeferner.github.io/redis-commander/",
@@ -140,7 +133,6 @@
140133
"shortDescZh": "开源的对象存储服务器",
141134
"shortDescEn": "Open source object storage server",
142135
"type": "tool",
143-
"required": [],
144136
"limit": 1,
145137
"crossVersionUpdate": true,
146138
"website": "https://min.io/download",
@@ -155,7 +147,6 @@
155147
"shortDescZh": "人人可用的开源数据可视化分析工具",
156148
"shortDescEn": "Open source data visualization and analysis tools available to everyone",
157149
"type": "tool",
158-
"required": [],
159150
"limit": 1,
160151
"recommend": 5,
161152
"crossVersionUpdate": true,
@@ -171,7 +162,6 @@
171162
"shortDescZh": "构建伟大,无所不能",
172163
"shortDescEn": "Build great things at any scale",
173164
"type": "tool",
174-
"required": [],
175165
"limit": 1,
176166
"crossVersionUpdate": false,
177167
"website": "https://www.jenkins.io/",
@@ -186,7 +176,6 @@
186176
"shortDescZh": "项目管理和代码托管平台",
187177
"shortDescEn": "Project management and code hosting platform",
188178
"type": "tool",
189-
"required": [],
190179
"limit": 1,
191180
"crossVersionUpdate": false,
192181
"website": "https://about.gitlab.com/",
@@ -201,7 +190,6 @@
201190
"shortDescZh": "开源关系型数据库",
202191
"shortDescEn": "Open Source Relational Database",
203192
"type": "runtime",
204-
"required": [],
205193
"limit": 1,
206194
"crossVersionUpdate": false,
207195
"website": "https://www.postgresql.org/",
@@ -216,7 +204,6 @@
216204
"shortDescZh": "分布式文件存储数据库",
217205
"shortDescEn": "Fractional file storage database",
218206
"type": "runtime",
219-
"required": [],
220207
"limit": 1,
221208
"crossVersionUpdate": false,
222209
"website": "https://www.mongodb.com/",
@@ -231,7 +218,6 @@
231218
"shortDescZh": "MYSQL 复刻版",
232219
"shortDescEn": "The open source relational database",
233220
"type": "runtime",
234-
"required": [],
235221
"crossVersionUpdate": false,
236222
"limit": 1,
237223
"website": "https://mariadb.org/",
@@ -246,7 +232,6 @@
246232
"shortDescZh": "Docker 镜像的存储和分发系统",
247233
"shortDescEn": "A storage and distribution system for named Docker images",
248234
"type": "runtime",
249-
"required": [],
250235
"crossVersionUpdate": false,
251236
"limit": 1,
252237
"website": "https://hub.docker.com/_/registry",
@@ -261,7 +246,6 @@
261246
"shortDescZh": "开源存储库",
262247
"shortDescEn": "An open source repository for build artifacts",
263248
"type": "runtime",
264-
"required": [],
265249
"crossVersionUpdate": false,
266250
"limit": 1,
267251
"website": "https://www.sonatype.com/products/nexus-repository",

apps/mariadb/metadata/logo.png

-11.4 KB
Loading

apps/mysql/versions/5.7.39/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"type": "password",
55
"labelZh": "root用户密码",
6-
"labelEn": "RootPassword",
6+
"labelEn": "Root Password",
77
"required": true,
88
"default": "mysql",
99
"random": true,

apps/mysql/versions/8.0.30/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"required": true,
88
"default": "mysql",
99
"random": true,
10-
"rule": "paramCommon",
10+
"rule": "paramComplexity",
1111
"envKey": "PANEL_DB_ROOT_PASSWORD"
1212
},
1313
{

apps/nexus/metadata/logo.png

4.97 KB
Loading

apps/postgresql/versions/15.2-alpine/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"labelZh": "用户名",
66
"labelEn": "Username",
77
"required": true,
8-
"default": "pg",
8+
"default": "user",
99
"random": true,
1010
"rule": "paramCommon",
1111
"envKey": "PANEL_DB_ROOT_USER"
@@ -15,7 +15,7 @@
1515
"labelZh": "用户密码",
1616
"labelEn": "Password",
1717
"required": true,
18-
"default": "pg",
18+
"default": "password",
1919
"random": true,
2020
"rule": "paramComplexity",
2121
"envKey": "PANEL_DB_ROOT_PASSWORD"

0 commit comments

Comments
 (0)