diff --git a/byte-muse/README.md b/byte-muse/README.md index ae2f1d259..1fe23fabf 100644 --- a/byte-muse/README.md +++ b/byte-muse/README.md @@ -27,6 +27,10 @@ + qBittorrent 下载器 + PT 站点密钥 +## 安装说明 + +> 激活请通过 `license` 版本进行激活 + --- ![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png) diff --git a/byte-muse/license/data.yml b/byte-muse/license/data.yml new file mode 100644 index 000000000..e8fb4861b --- /dev/null +++ b/byte-muse/license/data.yml @@ -0,0 +1,10 @@ +additionalProperties: + formFields: + - default: 5000 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelZh: WebUI 端口 + labelEn: WebUI port + required: true + rule: paramPort + type: number diff --git a/byte-muse/license/docker-compose.yml b/byte-muse/license/docker-compose.yml new file mode 100644 index 000000000..08bb60ee9 --- /dev/null +++ b/byte-muse/license/docker-compose.yml @@ -0,0 +1,15 @@ +networks: + 1panel-network: + external: true + +services: + byte-muse-license: + image: envyafish/byte-muse-license:latest + container_name: ${CONTAINER_NAME} + labels: + createdBy: "Apps" + restart: always + networks: + - 1panel-network + ports: + - ${PANEL_APP_PORT_HTTP}:5000 diff --git a/byte-muse/license/envs/default.env b/byte-muse/license/envs/default.env new file mode 100644 index 000000000..cd05f46e6 --- /dev/null +++ b/byte-muse/license/envs/default.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +ENV_FILE=.env diff --git a/byte-muse/license/envs/global.env b/byte-muse/license/envs/global.env new file mode 100644 index 000000000..e10989fe4 --- /dev/null +++ b/byte-muse/license/envs/global.env @@ -0,0 +1,2 @@ +# copyright© 2024 XinJiang Ms Studio +TZ=Asia/Shanghai diff --git a/byte-muse/license/scripts/init.sh b/byte-muse/license/scripts/init.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/byte-muse/license/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/byte-muse/license/scripts/uninstall.sh b/byte-muse/license/scripts/uninstall.sh new file mode 100644 index 000000000..c86c4fbca --- /dev/null +++ b/byte-muse/license/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/byte-muse/license/scripts/upgrade.sh b/byte-muse/license/scripts/upgrade.sh new file mode 100644 index 000000000..07fb8c3fe --- /dev/null +++ b/byte-muse/license/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