From 190f31a2d17e10e9549b79937b35bb73c2e2bb2a Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Fri, 29 Aug 2025 12:26:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20MoonTV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Meng Sen --- apps/moontv/README.md | 6 ++ apps/moontv/latest/data.yml | 127 ++++++++++++++++++++++++ apps/moontv/latest/docker-compose.yml | 20 ++++ apps/moontv/latest/envs/default.env | 2 + apps/moontv/latest/envs/global.env | 2 + apps/moontv/latest/scripts/init.sh | 17 ++++ apps/moontv/latest/scripts/uninstall.sh | 10 ++ apps/moontv/latest/scripts/upgrade.sh | 17 ++++ 8 files changed, 201 insertions(+) create mode 100644 apps/moontv/latest/data.yml create mode 100644 apps/moontv/latest/docker-compose.yml create mode 100644 apps/moontv/latest/envs/default.env create mode 100644 apps/moontv/latest/envs/global.env create mode 100644 apps/moontv/latest/scripts/init.sh create mode 100644 apps/moontv/latest/scripts/uninstall.sh create mode 100644 apps/moontv/latest/scripts/upgrade.sh diff --git a/apps/moontv/README.md b/apps/moontv/README.md index 6abcb0103..fb59f4088 100644 --- a/apps/moontv/README.md +++ b/apps/moontv/README.md @@ -6,6 +6,10 @@ ![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue) +## 公告 + +项目已死,感谢各位的支持。 + ## 简介 MoonTV 是一个开箱即用的、跨平台的影视聚合播放器。它基于 Next.js 14 + Tailwind CSS + TypeScript @@ -13,6 +17,8 @@ MoonTV 是一个开箱即用的、跨平台的影视聚合播放器。它基于 ## 授权码 +> latest 已移除授权码,无需授权码 + 请自行阅读官方文档,获取授权码。 ## 特性 diff --git a/apps/moontv/latest/data.yml b/apps/moontv/latest/data.yml new file mode 100644 index 000000000..2154c257e --- /dev/null +++ b/apps/moontv/latest/data.yml @@ -0,0 +1,127 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_REDIS_SERVICE + required: false + type: service + default: redis + envKey: PANEL_REDIS_TYPE + labelZh: Redis 服务 (前置检查) + labelEn: Redis Service (Pre-check) + required: false + type: apps + values: + - label: Redis + value: redis + - label: Kvrocks + value: kvrocks + - default: 3000 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number + - default: "MoonTV" + edit: true + envKey: SITE_NAME + labelZh: 网站名称 + labelEn: Site Name + required: true + type: text + - default: "本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。" + edit: true + envKey: ANNOUNCEMENT + labelZh: 站点公告 + labelEn: Site Announcement + required: true + type: text + - default: 5 + edit: true + envKey: NEXT_PUBLIC_SEARCH_MAX_PAGE + labelZh: 搜索结果最大页数 + labelEn: Search result maximum number of pages + required: true + type: number + - default: "" + edit: true + envKey: USERNAME + labelZh: 管理员用户名 + labelEn: Admin Username + required: true + type: text + - default: "" + edit: true + envKey: PASSWORD + labelZh: 管理员密码 + labelEn: Admin Password + required: true + type: password + - default: "false" + edit: true + envKey: NEXT_PUBLIC_ENABLE_REGISTER + labelZh: 是否允许注册 + labelEn: Enable Register + required: true + type: select + values: + - label: 允许注册 + value: "true" + - label: 禁用注册 + value: "false" + - default: "false" + edit: true + envKey: NEXT_PUBLIC_DISABLE_YELLOW_FILTER + labelZh: 关闭色情内容过滤 + labelEn: Disable Yellow Filter + required: true + type: select + values: + - label: 开启过滤 + value: "true" + - label: 禁用过滤 + value: "false" + - default: "redis" + edit: true + envKey: NEXT_PUBLIC_STORAGE_TYPE + labelZh: 数据存储类型 + labelEn: Storage Type + required: true + type: select + values: + - label: Upstash + value: "upstash" + - label: Redis + value: "redis" + - label: Kvrocks + value: "kvrocks" + - default: "redis://127.0.0.1:6379" + edit: true + envKey: REDIS_URL + labelZh: Redis 地址 (Redis 存储) + labelEn: Redis Address (Redis Storage) + required: false + type: text + - default: "redis://127.0.0.1:6666" + edit: true + envKey: KVROCKS_URL + labelZh: Kvrocks 地址 (Kvrocks 存储) + labelEn: Kvrocks Address (Kvrocks Storage) + required: false + type: text + - default: "" + edit: true + envKey: UPSTASH_URL + labelZh: Upstash 地址 (Upstash 存储) + labelEn: Upstash Address (Upstash Storage) + required: false + type: text + - default: "" + edit: true + envKey: UPSTASH_TOKEN + labelZh: Upstash 授权码 (Upstash 存储) + labelEn: Upstash Token (Upstash Storage) + required: false + type: password diff --git a/apps/moontv/latest/docker-compose.yml b/apps/moontv/latest/docker-compose.yml new file mode 100644 index 000000000..1c20291bd --- /dev/null +++ b/apps/moontv/latest/docker-compose.yml @@ -0,0 +1,20 @@ +networks: + 1panel-network: + external: true + +services: + moontv: + image: ghcr.io/moontechlab/lunatv:latest + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:3000 + env_file: + - ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env} + - ${ENV_FILE:-/etc/1panel/envs/default.env} + environment: + - TZ=Asia/Shanghai diff --git a/apps/moontv/latest/envs/default.env b/apps/moontv/latest/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/apps/moontv/latest/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/apps/moontv/latest/envs/global.env b/apps/moontv/latest/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/apps/moontv/latest/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/apps/moontv/latest/scripts/init.sh b/apps/moontv/latest/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/moontv/latest/scripts/init.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/moontv/latest/scripts/uninstall.sh b/apps/moontv/latest/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/apps/moontv/latest/scripts/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi diff --git a/apps/moontv/latest/scripts/upgrade.sh b/apps/moontv/latest/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/apps/moontv/latest/scripts/upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ -f .env ]; then + source .env + + # setup-1 add default values + CURRENT_DIR=$(pwd) + sed -i '/^ENV_FILE=/d' .env + sed -i '/^GLOBAL_ENV_FILE=/d' .env + echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env + echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env + + echo "Check Finish." + +else + echo "Error: .env file not found." +fi