feat: import Havline fnOS application package
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
havline:
|
||||
# TODO: 发布多架构镜像后,把 your-org 替换为实际镜像命名空间。
|
||||
image: ghcr.io/your-org/havline:${TRIM_APPVER}
|
||||
container_name: havline
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${wizard_service_port}:6893"
|
||||
- "${wizard_nginx_http_port}:80"
|
||||
- "${wizard_nginx_https_port}:443"
|
||||
volumes:
|
||||
- "${TRIM_PKGVAR}:/data"
|
||||
environment:
|
||||
HAVLINE_DATA_DIR: /data
|
||||
HAVLINE_LISTEN: ":6893"
|
||||
HAVLINE_NGINX_HTTP_PORT: "80"
|
||||
HAVLINE_NGINX_HTTPS_PORT: "443"
|
||||
HAVLINE_SESSION_SECRET: ""
|
||||
HAVLINE_UPDATER_SOCKET: ""
|
||||
HAVLINE_INITIAL_ADMIN_PASSWORD: "${wizard_initial_admin_password}"
|
||||
TZ: "${wizard_timezone}"
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
".url": {
|
||||
"havline.main": {
|
||||
"title": "Havline",
|
||||
"icon": "images/icon_{0}.png",
|
||||
"type": "iframe",
|
||||
"protocol": "http",
|
||||
"port": "${wizard_service_port}",
|
||||
"url": "/",
|
||||
"allUsers": false,
|
||||
"control": {
|
||||
"accessPerm": "readonly"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
for var in wizard_service_port wizard_nginx_http_port wizard_nginx_https_port; do
|
||||
value="${!var:-}"
|
||||
if ! [[ "$value" =~ ^[0-9]+$ ]]; then
|
||||
echo "$var 必须是数字端口" > "$TRIM_TEMP_LOGFILE"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
exit 0
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
mkdir -p "$TRIM_PKGVAR" "$TRIM_PKGVAR/backups"
|
||||
chown -R "$TRIM_USERNAME:$TRIM_GROUPNAME" "$TRIM_PKGVAR"
|
||||
|
||||
echo "Havline 数据目录已准备:$TRIM_PKGVAR"
|
||||
exit 0
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
exit 0
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
CONTAINER_NAME="havline"
|
||||
LOG_FILE="${TRIM_TEMP_LOGFILE:-/dev/stderr}"
|
||||
|
||||
log_error() {
|
||||
echo "$1" > "$LOG_FILE"
|
||||
}
|
||||
|
||||
is_running() {
|
||||
docker inspect "$CONTAINER_NAME" 2>/dev/null | grep -q '"Status": "running"'
|
||||
}
|
||||
|
||||
case "${1:-}" in
|
||||
start|stop)
|
||||
exit 0
|
||||
;;
|
||||
status)
|
||||
if is_running; then
|
||||
exit 0
|
||||
fi
|
||||
exit 3
|
||||
;;
|
||||
*)
|
||||
log_error "Unknown command: ${1:-}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -u
|
||||
|
||||
if [ "${wizard_uninstall_mode:-keep}" = "purge" ]; then
|
||||
rm -rf "$TRIM_PKGVAR"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
exit 0
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
if [ -f "$TRIM_PKGVAR/havline.db" ] && [ ! -r "$TRIM_PKGVAR/havline.db" ]; then
|
||||
echo "数据库不可读:$TRIM_PKGVAR/havline.db" > "$TRIM_TEMP_LOGFILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$TRIM_PKGVAR/session_secret" ] && [ ! -r "$TRIM_PKGVAR/session_secret" ]; then
|
||||
echo "会话密钥不可读:$TRIM_PKGVAR/session_secret" > "$TRIM_TEMP_LOGFILE"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
exit 0
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"defaults": {
|
||||
"run-as": "package"
|
||||
},
|
||||
"username": "havline",
|
||||
"groupname": "havline"
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"docker-project": {
|
||||
"projects": [
|
||||
{
|
||||
"name": "havline",
|
||||
"path": "docker"
|
||||
}
|
||||
]
|
||||
},
|
||||
"data-share": {
|
||||
"shares": [
|
||||
{
|
||||
"name": "havline/backups"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
appname = havline
|
||||
version = 1.9.0
|
||||
display_name = Havline
|
||||
desc = NAS 公网访问管理:反向代理、DDNS、HTTPS 证书、FRP、Cloudflare Tunnel 与一键升级
|
||||
platform = all
|
||||
source = thirdparty
|
||||
maintainer = Havline
|
||||
maintainer_url = http://45.207.223.190:10082/mrlee/Havline
|
||||
distributor = Havline
|
||||
desktop_uidir = ui
|
||||
desktop_applaunchname = havline.main
|
||||
checkport = false
|
||||
ctl_stop = true
|
||||
changelog = 首发飞牛应用:支持安装向导、端口配置、数据持久化和应用中心升级
|
||||
@@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"stepTitle": "端口设置",
|
||||
"items": [
|
||||
{
|
||||
"type": "text",
|
||||
"field": "wizard_nginx_http_port",
|
||||
"label": "HTTP 反向代理端口",
|
||||
"initValue": "18080",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入 HTTP 端口" },
|
||||
{ "pattern": "^[0-9]+$", "message": "端口必须是数字" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"field": "wizard_nginx_https_port",
|
||||
"label": "HTTPS 反向代理端口",
|
||||
"initValue": "9443",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入 HTTPS 端口" },
|
||||
{ "pattern": "^[0-9]+$", "message": "端口必须是数字" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"stepTitle": "基础设置",
|
||||
"items": [
|
||||
{
|
||||
"type": "select",
|
||||
"field": "wizard_timezone",
|
||||
"label": "时区",
|
||||
"initValue": "Asia/Shanghai",
|
||||
"options": [
|
||||
{ "label": "Asia/Shanghai", "value": "Asia/Shanghai" },
|
||||
{ "label": "UTC", "value": "UTC" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,70 @@
|
||||
[
|
||||
{
|
||||
"stepTitle": "端口设置",
|
||||
"items": [
|
||||
{
|
||||
"type": "text",
|
||||
"field": "wizard_service_port",
|
||||
"label": "Havline 管理端口",
|
||||
"initValue": "6893",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入管理端口" },
|
||||
{ "pattern": "^[0-9]+$", "message": "端口必须是数字" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"field": "wizard_nginx_http_port",
|
||||
"label": "HTTP 反向代理端口",
|
||||
"initValue": "18080",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入 HTTP 端口" },
|
||||
{ "pattern": "^[0-9]+$", "message": "端口必须是数字" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"field": "wizard_nginx_https_port",
|
||||
"label": "HTTPS 反向代理端口",
|
||||
"initValue": "9443",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入 HTTPS 端口" },
|
||||
{ "pattern": "^[0-9]+$", "message": "端口必须是数字" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"stepTitle": "管理员初始化",
|
||||
"items": [
|
||||
{
|
||||
"type": "password",
|
||||
"field": "wizard_initial_admin_password",
|
||||
"label": "初始管理员密码",
|
||||
"rules": [
|
||||
{ "required": true, "message": "请输入初始管理员密码" },
|
||||
{ "min": 8, "message": "密码至少 8 位" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "首次启动时使用该密码创建 admin 管理员。登录后请在系统设置中修改密码。"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"stepTitle": "基础设置",
|
||||
"items": [
|
||||
{
|
||||
"type": "select",
|
||||
"field": "wizard_timezone",
|
||||
"label": "时区",
|
||||
"initValue": "Asia/Shanghai",
|
||||
"options": [
|
||||
{ "label": "Asia/Shanghai", "value": "Asia/Shanghai" },
|
||||
{ "label": "UTC", "value": "UTC" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
[
|
||||
{
|
||||
"stepTitle": "卸载选项",
|
||||
"items": [
|
||||
{
|
||||
"type": "radio",
|
||||
"field": "wizard_uninstall_mode",
|
||||
"label": "数据处理",
|
||||
"initValue": "keep",
|
||||
"options": [
|
||||
{ "label": "保留数据(推荐)", "value": "keep" },
|
||||
{ "label": "删除全部数据", "value": "purge" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "tips",
|
||||
"helpText": "删除数据将移除数据库、证书、Nginx 配置、FRP 与 Cloudflare 配置,且无法恢复。"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user