From 5d75faa6e4f345db51f5c80c7c95640c8cd106eb Mon Sep 17 00:00:00 2001 From: okxlin Date: Mon, 22 Jul 2024 01:10:06 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=87=8D=E6=9E=84=E8=BF=85=E9=9B=B7?= =?UTF-8?q?=E9=80=82=E9=85=8D#1849?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/xunlei/3.20.1/.env.sample | 16 ++- apps/xunlei/3.20.1/data.yml | 157 ++++++++++++++++++-------- apps/xunlei/3.20.1/docker-compose.yml | 30 ++--- apps/xunlei/data.yml | 3 +- apps/xunlei/latest/.env.sample | 16 ++- apps/xunlei/latest/data.yml | 157 ++++++++++++++++++-------- apps/xunlei/latest/docker-compose.yml | 30 ++--- 7 files changed, 281 insertions(+), 128 deletions(-) diff --git a/apps/xunlei/3.20.1/.env.sample b/apps/xunlei/3.20.1/.env.sample index 4ac786f2..cc8f4ece 100644 --- a/apps/xunlei/3.20.1/.env.sample +++ b/apps/xunlei/3.20.1/.env.sample @@ -1,7 +1,15 @@ CONTAINER_NAME="xunlei" -PANEL_APP_PORT_HTTP="40163" DATA_PATH="./data/data" -MOUNT_PATH="./data/downloads" +DOWNLOAD_PATH="./data/downloads" HOSTNAME="mynas" -HTTP_USER="user" -HTTP_PWD="xunlei_password" +PANEL_APP_PORT_HTTP=40163 +PRIVILEGED_MODE="true" +XL_DASHBOARD_IP="0.0.0.0" +XL_DASHBOARD_PASSWORD="xunlei" +XL_DASHBOARD_USERNAME="user" +XL_DEBUG="false" +XL_DIR_DATA="/xunlei/data" +XL_DIR_DOWNLOAD="/xunlei/downloads" +XL_GID=1000 +XL_PREVENT_UPDATE="true" +XL_UID=1000 diff --git a/apps/xunlei/3.20.1/data.yml b/apps/xunlei/3.20.1/data.yml index 86e874a7..dccce722 100644 --- a/apps/xunlei/3.20.1/data.yml +++ b/apps/xunlei/3.20.1/data.yml @@ -1,47 +1,112 @@ additionalProperties: - formFields: - - default: 40163 - edit: true - envKey: PANEL_APP_PORT_HTTP - labelEn: Port - labelZh: 端口 - required: true - rule: paramPort - type: number - - default: ./data/data - edit: true - envKey: DATA_PATH - labelEn: Data folder path - labelZh: 数据文件夹路径 - required: true - type: text - - default: ./data/downloads - edit: true - envKey: DOWNLOAD_PATH - labelEn: Download folder path - labelZh: 下载文件夹路径 - required: true - type: text - - default: mynas - edit: true - envKey: HOSTNAME - labelEn: hostname - labelZh: 主机名 - required: true - type: text - - default: user - edit: true - envKey: HTTP_USER - labelEn: http auth user - labelZh: HTTP 用户 - required: true - type: text - - default: xunlei - edit: true - envKey: HTTP_PWD - labelEn: http auth password - labelZh: HTTP 密码 - random: true - required: true - rule: paramComplexity - type: password + formFields: + - default: "40163" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "./data/data" + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text + - default: "./data/downloads" + edit: true + envKey: DOWNLOAD_PATH + labelEn: Download Path + labelZh: 下载路径 + required: true + type: text + - default: "0.0.0.0" + edit: true + envKey: XL_DASHBOARD_IP + labelEn: Dashboard IP + labelZh: 控制台 IP + required: true + type: text + - default: "user" + edit: true + envKey: XL_DASHBOARD_USERNAME + labelEn: Dashboard Username + labelZh: 控制台用户名 + required: false + type: text + - default: "xunlei" + edit: true + envKey: XL_DASHBOARD_PASSWORD + labelEn: Dashboard Password + labelZh: 控制台密码 + required: false + rule: paramComplexity + type: password + - default: "/xunlei/downloads" + disabled: true + envKey: XL_DIR_DOWNLOAD + labelEn: Download Directory (in container) + labelZh: 下载目录 (容器内) + required: true + type: text + - default: "/xunlei/data" + disabled: true + envKey: XL_DIR_DATA + labelEn: Data Directory (in container) + labelZh: 数据目录 (容器内) + required: true + type: text + - default: "1000" + edit: true + envKey: XL_UID + labelEn: User ID + labelZh: 用户 ID + required: true + type: number + - default: "1000" + edit: true + envKey: XL_GID + labelEn: Group ID + labelZh: 用户组 ID + required: true + type: number + - default: "true" + edit: true + envKey: XL_PREVENT_UPDATE + labelEn: Prevent Update + labelZh: 阻止更新 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "false" + edit: true + envKey: XL_DEBUG + labelEn: Debug Mode + labelZh: 调试模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "mynas" + edit: true + envKey: HOSTNAME + labelEn: Hostname + labelZh: 主机名 + required: false + type: text + - default: "true" + disabled: true + envKey: PRIVILEGED_MODE + labelEn: Privilege mode switch + labelZh: 特权模式开关 + required: true + type: text \ No newline at end of file diff --git a/apps/xunlei/3.20.1/docker-compose.yml b/apps/xunlei/3.20.1/docker-compose.yml index 8f6856d6..d19050ae 100644 --- a/apps/xunlei/3.20.1/docker-compose.yml +++ b/apps/xunlei/3.20.1/docker-compose.yml @@ -1,5 +1,6 @@ services: xunlei: + image: "cnk3x/xunlei:3.20.1" container_name: ${CONTAINER_NAME} restart: always networks: @@ -7,21 +8,24 @@ services: ports: - "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}" volumes: - - "${DATA_PATH}:/xunlei/data" - - "${DOWNLOAD_PATH}:/xunlei/downloads" + - "${DATA_PATH}:${XL_DIR_DATA}" + - "${DOWNLOAD_PATH}:${XL_DIR_DOWNLOAD}" environment: - - UID=1000 - - GID=1000 - - XL_DEBUG=0 - - XL_WEB_PORT=${PANEL_APP_PORT_HTTP} - - XL_BA_USER=${HTTP_USER} - - XL_BA_PASSWORD=${HTTP_PWD} + - XL_DASHBOARD_PORT=${PANEL_APP_PORT_HTTP} + - XL_DASHBOARD_IP=${XL_DASHBOARD_IP} + - XL_DASHBOARD_USERNAME=${XL_DASHBOARD_USERNAME} + - XL_DASHBOARD_PASSWORD=${XL_DASHBOARD_PASSWORD} + - XL_DIR_DOWNLOAD=${XL_DIR_DOWNLOAD} + - XL_DIR_DATA=${XL_DIR_DATA} + - XL_UID=${XL_UID} + - XL_GID=${XL_GID} + - XL_PREVENT_UPDATE=${XL_PREVENT_UPDATE} + - XL_DEBUG=${XL_DEBUG} hostname: ${HOSTNAME} - privileged: true - image: cnk3x/xunlei:3.20.1 - labels: + privileged: ${PRIVILEGED_MODE} + labels: createdBy: "Apps" -networks: - 1panel-network: +networks: + 1panel-network: external: true diff --git a/apps/xunlei/data.yml b/apps/xunlei/data.yml index 67df88ef..72a8eef4 100644 --- a/apps/xunlei/data.yml +++ b/apps/xunlei/data.yml @@ -1,8 +1,7 @@ name: 迅雷 tags: - - 工具 + - 实用工具 title: 提取自群晖平台的迅雷下载套件 -type: 工具 description: 提取自群晖平台的迅雷下载套件 additionalProperties: key: xunlei diff --git a/apps/xunlei/latest/.env.sample b/apps/xunlei/latest/.env.sample index 4ac786f2..cc8f4ece 100644 --- a/apps/xunlei/latest/.env.sample +++ b/apps/xunlei/latest/.env.sample @@ -1,7 +1,15 @@ CONTAINER_NAME="xunlei" -PANEL_APP_PORT_HTTP="40163" DATA_PATH="./data/data" -MOUNT_PATH="./data/downloads" +DOWNLOAD_PATH="./data/downloads" HOSTNAME="mynas" -HTTP_USER="user" -HTTP_PWD="xunlei_password" +PANEL_APP_PORT_HTTP=40163 +PRIVILEGED_MODE="true" +XL_DASHBOARD_IP="0.0.0.0" +XL_DASHBOARD_PASSWORD="xunlei" +XL_DASHBOARD_USERNAME="user" +XL_DEBUG="false" +XL_DIR_DATA="/xunlei/data" +XL_DIR_DOWNLOAD="/xunlei/downloads" +XL_GID=1000 +XL_PREVENT_UPDATE="true" +XL_UID=1000 diff --git a/apps/xunlei/latest/data.yml b/apps/xunlei/latest/data.yml index 86e874a7..dccce722 100644 --- a/apps/xunlei/latest/data.yml +++ b/apps/xunlei/latest/data.yml @@ -1,47 +1,112 @@ additionalProperties: - formFields: - - default: 40163 - edit: true - envKey: PANEL_APP_PORT_HTTP - labelEn: Port - labelZh: 端口 - required: true - rule: paramPort - type: number - - default: ./data/data - edit: true - envKey: DATA_PATH - labelEn: Data folder path - labelZh: 数据文件夹路径 - required: true - type: text - - default: ./data/downloads - edit: true - envKey: DOWNLOAD_PATH - labelEn: Download folder path - labelZh: 下载文件夹路径 - required: true - type: text - - default: mynas - edit: true - envKey: HOSTNAME - labelEn: hostname - labelZh: 主机名 - required: true - type: text - - default: user - edit: true - envKey: HTTP_USER - labelEn: http auth user - labelZh: HTTP 用户 - required: true - type: text - - default: xunlei - edit: true - envKey: HTTP_PWD - labelEn: http auth password - labelZh: HTTP 密码 - random: true - required: true - rule: paramComplexity - type: password + formFields: + - default: "40163" + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number + - default: "./data/data" + edit: true + envKey: DATA_PATH + labelEn: Data Path + labelZh: 数据路径 + required: true + type: text + - default: "./data/downloads" + edit: true + envKey: DOWNLOAD_PATH + labelEn: Download Path + labelZh: 下载路径 + required: true + type: text + - default: "0.0.0.0" + edit: true + envKey: XL_DASHBOARD_IP + labelEn: Dashboard IP + labelZh: 控制台 IP + required: true + type: text + - default: "user" + edit: true + envKey: XL_DASHBOARD_USERNAME + labelEn: Dashboard Username + labelZh: 控制台用户名 + required: false + type: text + - default: "xunlei" + edit: true + envKey: XL_DASHBOARD_PASSWORD + labelEn: Dashboard Password + labelZh: 控制台密码 + required: false + rule: paramComplexity + type: password + - default: "/xunlei/downloads" + disabled: true + envKey: XL_DIR_DOWNLOAD + labelEn: Download Directory (in container) + labelZh: 下载目录 (容器内) + required: true + type: text + - default: "/xunlei/data" + disabled: true + envKey: XL_DIR_DATA + labelEn: Data Directory (in container) + labelZh: 数据目录 (容器内) + required: true + type: text + - default: "1000" + edit: true + envKey: XL_UID + labelEn: User ID + labelZh: 用户 ID + required: true + type: number + - default: "1000" + edit: true + envKey: XL_GID + labelEn: Group ID + labelZh: 用户组 ID + required: true + type: number + - default: "true" + edit: true + envKey: XL_PREVENT_UPDATE + labelEn: Prevent Update + labelZh: 阻止更新 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "false" + edit: true + envKey: XL_DEBUG + labelEn: Debug Mode + labelZh: 调试模式 + required: true + type: select + values: + - label: "True" + value: "true" + - label: "False" + value: "false" + - default: "mynas" + edit: true + envKey: HOSTNAME + labelEn: Hostname + labelZh: 主机名 + required: false + type: text + - default: "true" + disabled: true + envKey: PRIVILEGED_MODE + labelEn: Privilege mode switch + labelZh: 特权模式开关 + required: true + type: text \ No newline at end of file diff --git a/apps/xunlei/latest/docker-compose.yml b/apps/xunlei/latest/docker-compose.yml index cec7529c..fa049622 100644 --- a/apps/xunlei/latest/docker-compose.yml +++ b/apps/xunlei/latest/docker-compose.yml @@ -1,5 +1,6 @@ services: xunlei: + image: "cnk3x/xunlei:latest" container_name: ${CONTAINER_NAME} restart: always networks: @@ -7,21 +8,24 @@ services: ports: - "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}" volumes: - - "${DATA_PATH}:/xunlei/data" - - "${DOWNLOAD_PATH}:/xunlei/downloads" + - "${DATA_PATH}:${XL_DIR_DATA}" + - "${DOWNLOAD_PATH}:${XL_DIR_DOWNLOAD}" environment: - - UID=1000 - - GID=1000 - - XL_DEBUG=0 - - XL_WEB_PORT=${PANEL_APP_PORT_HTTP} - - XL_BA_USER=${HTTP_USER} - - XL_BA_PASSWORD=${HTTP_PWD} + - XL_DASHBOARD_PORT=${PANEL_APP_PORT_HTTP} + - XL_DASHBOARD_IP=${XL_DASHBOARD_IP} + - XL_DASHBOARD_USERNAME=${XL_DASHBOARD_USERNAME} + - XL_DASHBOARD_PASSWORD=${XL_DASHBOARD_PASSWORD} + - XL_DIR_DOWNLOAD=${XL_DIR_DOWNLOAD} + - XL_DIR_DATA=${XL_DIR_DATA} + - XL_UID=${XL_UID} + - XL_GID=${XL_GID} + - XL_PREVENT_UPDATE=${XL_PREVENT_UPDATE} + - XL_DEBUG=${XL_DEBUG} hostname: ${HOSTNAME} - privileged: true - image: cnk3x/xunlei:latest - labels: + privileged: ${PRIVILEGED_MODE} + labels: createdBy: "Apps" -networks: - 1panel-network: +networks: + 1panel-network: external: true