2025/06/16
本帖停止维护,将来应该会失效
鉴于飞牛当前不支持
自行二开对接的状态,
转回群晖了
开源思维在国产支持
不了一点
前因
官方已经上线的需求里有一个添加自定义图标,但是我个人认为做歪了,不符合用户需求,就自己动手了
可以实现把自己的网站、应用什么的都加到飞牛桌面上
效果



第一步:连接飞牛数据库!
如果你直接用sql语句插入数据的话完全不用3到9小步!!!!连上数据库直接插数据就完事儿了
使用root登录飞牛
- 切换到数据库用户
su postgres
- 直连数据库
psql -U postgres -d appcenter
PS:飞牛的数据库账号一些密码可以在这里看到
就是使用psql连上数据库的时候向上翻历史命令,能看到几个用户的初始密码
- 创建一个用户superme密码我用的同样的
CREATE USER superme password 'superme';
- 授予用户访问权限
GRANT CONNECT ON DATABASE appcenter TO superme;
- 授予用户所有表的所有权限
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO superme;
- 更改数据库配置文件
/etc/postgresql/15/main/postgresql.conf
中 listen_addresses = '*'
- 更改数据库权限配置文件
/etc/postgresql/15/main/pg_hba.conf
中增加 host all all 0.0.0.0/0 md5
- 重启服务
systemctl restart postgresql
- 通过可视化工具连接数据库,我的服务器IP是192.168.188.253
192.168.188.253:5432
第二步:添加亿点点数据进去
以我可爱的dpanel举例
- app表里,id自增,改改名、版本号什么的
id |
app_name |
name |
version |
version_id |
tags |
maintainer |
distributor |
download_count |
install_type |
path |
install_volume_id |
data_share_volume_id |
data_volume_id |
manual_install |
is_stop |
is_uninstall |
is_beta |
is_docker |
min_size |
service_url |
source |
source_id |
status |
is_non_manual_stop |
is_systemd_uint |
disable_authorization_path |
created_at |
updated_at |
features |
micro_app |
native_app |
10005 |
superme.dpanel |
dpanel |
1.0.0 |
1 |
Practical Efficiency |
superme |
superme |
1 |
|
/var/apps/superme.dpanel |
1 |
1 |
1 |
false |
false |
false |
false |
false |
1,000 |
|
thirdparty |
999 |
running |
false |
false |
false |
2025-01-26 11:01:16.730 +0800 |
2025-01-27 11:10:31.829 +0800 |
|
false |
false |
- app_service表里,app_id是上面表里你那个自增的id,同样自增、改改名什么的,主要记得url改一下,体验完美
id |
app_id |
service_name |
title |
desc |
icon |
type |
url |
is_admin |
created_at |
updated_at |
default_url |
control |
full_url |
7 |
10005 |
superme.dpanel.Application |
dpanel |
dpanel |
ui/images/icon_{0}.png |
url |
http://192.168.188.253:8807/ |
true |
2025-01-26 11:01:16.731 +0800 |
2025-01-26 11:13:41.456 +0800 |
http://192.168.188.253:8807/ |
{"show":0,"showRoute":0,"auth":0,"port":0,"path":0,"fullUrl":0} |
https://www.google.com:8807 |
- app_user_group表里,把你的用户数据造一造,随便写写 好记就行,我这个appuser的user_group_id减一、appgroup的user_group_id加一
id |
user_group_id |
type |
created_at |
15 |
10001,006 |
appgroup |
2025-01-26 11:01:16.730 +0800 |
16 |
1000992 |
appuser |
2025-01-26 11:01:16.731 +0800 |
- app_user_group_record表里,加上关联数据,看数字进行体会
id |
app_id |
user_group_id |
type |
created_at |
13 |
10005 |
1000992 |
appuser |
2025-01-26 11:01:16.731 +0800 |
14 |
10005 |
10001,006 |
appgroup |
2025-01-26 11:01:16.731 +0800 |
添加完之后,刷新飞牛桌面,就能看到它了,图片我懒得加
图片在这个目录下加
