From f2b48133293840c9837fbc2c7517e01b862e70b1 Mon Sep 17 00:00:00 2001 From: Meng Sen Date: Thu, 7 Nov 2024 13:26:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=20NexusPHP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Meng Sen --- nexusphp/1.8.14/data.yml | 178 ----------------------------- nexusphp/1.8.14/docker-compose.yml | 8 +- nexusphp/1.8.14/scripts/init.sh | 8 ++ 3 files changed, 13 insertions(+), 181 deletions(-) diff --git a/nexusphp/1.8.14/data.yml b/nexusphp/1.8.14/data.yml index 844a573cd..3293ee6a6 100644 --- a/nexusphp/1.8.14/data.yml +++ b/nexusphp/1.8.14/data.yml @@ -1,38 +1,5 @@ additionalProperties: formFields: - - child: - default: "" - envKey: PANEL_DB_HOST - required: true - type: service - default: mysql - edit: true - envKey: PANEL_DB_TYPE - labelZh: MySQL 服务 (前置检查) - labelEn: Database Service (Pre-check) - required: true - type: apps - values: - - label: MySQL - value: mysql - - label: MariaDB - value: mariadb - - label: Percona - value: percona - - child: - default: "" - envKey: PANEL_REDIS_SERVICE - required: true - type: service - default: redis - envKey: PANEL_REDIS_TYPE - labelZh: Redis 服务 (前置检查) - labelEn: Redis Service (Pre-check) - required: true - type: apps - values: - - label: Redis - value: redis - default: "/home/nexusphp" edit: true envKey: NEXUSPHP_ROOT_PATH @@ -69,20 +36,6 @@ additionalProperties: required: true rule: paramPort type: number - - default: "http://localhost" - edit: true - envKey: APP_URL - labelZh: 公网地址 - labelEn: Public URL - required: true - type: text - - default: "NexusPHP" - edit: true - envKey: APP_NAME - labelZh: 应用名称 - labelEn: Application Name - required: true - type: text - default: "base64:WUbN2wa2kl3E1VDW4iKaH3RBHw3hKY7BK0hWEkBZmGg=" edit: true envKey: APP_KEY @@ -90,134 +43,3 @@ additionalProperties: labelEn: Application Key required: true type: text - - default: "" - edit: true - envKey: NAS_TOOLS_KEY - labelZh: NAS Tools 密钥 (MoviePilot) - labelEn: NAS Tools Key (MoviePilot) - required: false - type: text - - default: "" - edit: true - envKey: IYUU_SECRET - labelZh: IYUU 密钥 - labelEn: IYUU Secret - required: false - type: text - - default: "127.0.0.1" - edit: true - envKey: DB_HOST - labelZh: 数据库 主机地址 - labelEn: Database Host - required: true - type: text - - default: 3306 - edit: true - envKey: DB_PORT - labelZh: 数据库 端口 - labelEn: Database Port - required: true - rule: paramPort - type: number - - default: "nexusphp" - edit: true - envKey: DB_DATABASE - labelZh: 数据库 名称 - labelEn: Database Name - required: true - rule: paramCommon - type: text - - default: "nexusphp" - edit: true - envKey: DB_USERNAME - labelZh: 数据库 用户名 - labelEn: Database Username - required: true - type: text - - default: "" - edit: true - envKey: DB_PASSWORD - labelZh: 数据库 密码 - labelEn: Database Password - random: true - required: true - rule: paramComplexity - type: password - - default: "127.0.0.1" - edit: true - envKey: REDIS_HOST - labelZh: Redis 主机 - labelEn: Redis Host - required: true - type: text - - default: 6379 - edit: true - envKey: REDIS_PORT - labelZh: Redis 端口 - labelEn: Redis Port - required: true - rule: paramPort - type: number - - default: 0 - edit: true - envKey: REDIS_DB - labelZh: Redis 索引 - labelEn: Redis Index - required: true - type: number - - default: "" - edit: true - envKey: REDIS_PASSWORD - labelZh: Redis 密码 - labelEn: Redis Password - required: false - type: password - - default: "smtp" - edit: true - envKey: MAIL_MAILER - labelZh: 邮件 发送协议 - labelEn: Mail Protocol - required: true - type: text - - default: "smtp.qq.com" - edit: true - envKey: MAIL_HOST - labelZh: 邮件 主机地址 - labelEn: Mail Host - required: true - type: text - - default: 25 - edit: true - envKey: MAIL_PORT - labelZh: 邮件 发送端口 - labelEn: Mail Port - required: true - type: number - - default: "" - edit: true - envKey: MAIL_USERNAME - labelZh: 邮件 效验用户名 - labelEn: Mail Username - required: false - type: text - - default: "" - edit: true - envKey: MAIL_PASSWORD - labelZh: 邮件 效验密码 - labelEn: Mail Password - required: false - type: password - - default: "tls" - edit: true - envKey: MAIL_ENCRYPTION - labelZh: 邮件 加密协议 - labelEn: Mail Encryption Protocol - required: true - type: text - - default: "" - edit: true - envKey: MAIL_FROM_ADDRESS - labelZh: 邮件 发件人地址 - labelEn: Mail From Address - required: false - type: text diff --git a/nexusphp/1.8.14/docker-compose.yml b/nexusphp/1.8.14/docker-compose.yml index af3e26be0..11e584215 100644 --- a/nexusphp/1.8.14/docker-compose.yml +++ b/nexusphp/1.8.14/docker-compose.yml @@ -15,12 +15,14 @@ services: - ${PANEL_APP_PORT_HTTP}:80 env_file: - /etc/1panel/envs/global.env + - /etc/1panel/envs/nexusphp/nexusphp.env - ${ENV_FILE:-/etc/1panel/envs/default.env} volumes: + - ${NEXUSPHP_ROOT_PATH}/config/.env.example:/var/www/html/.env.example - ${NEXUSPHP_ROOT_PATH}/data:/var/www/html - - ${NEXUSPHP_ROOT_PATH}/torrents:/var/www/html/torrents - - ${NEXUSPHP_ROOT_PATH}/bitbucket:/var/www/html/bitbucket - - ${NEXUSPHP_ROOT_PATH}/attachments:/var/www/html/attachments + - ${NEXUSPHP_TORRENTS_ROOT_PATH}/torrents:/var/www/html/torrents + - ${NEXUSPHP_BITBUCKET_ROOT_PATH}/bitbucket:/var/www/html/bitbucket + - ${NEXUSPHP_ATTACHMENTS_ROOT_PATH}/attachments:/var/www/html/attachments environment: - TIMEZONE=Asia/Shanghai - APP_DEBUG=false diff --git a/nexusphp/1.8.14/scripts/init.sh b/nexusphp/1.8.14/scripts/init.sh index 07d7a8451..fc799a880 100644 --- a/nexusphp/1.8.14/scripts/init.sh +++ b/nexusphp/1.8.14/scripts/init.sh @@ -19,6 +19,14 @@ if [ -f .env ]; then echo "Error: Failed to download GeoIP2 database." fi + # setup-3 copy env file + CONFIG_DIR="$NEXUSPHP_ROOT_PATH/config" + mkdir -p "$CONFIG_DIR" + + CONFIG_FILE="$CONFIG_DIR/.env.example" + cp /etc/1panel/envs/nexusphp/nexusphp.env $CONFIG_FILE + sed -i "s/APP_KEY=.*/APP_KEY=$APP_KEY/" $CONFIG_FILE + echo "Check Finish." else