发布 Bitmagnet

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
2024-10-21 13:58:42 +08:00
parent f7272d0d2c
commit ba8b163b04
10 changed files with 235 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
additionalProperties:
formFields:
- child:
default: ""
envKey: PANEL_POSTGRES_SERVICE
required: true
type: service
default: postgresql
envKey: PANEL_POSTGRES_TYPE
labelZh: Postgres 服务 (前置检查)
labelEn: Postgres Service (Pre-check)
required: true
type: apps
values:
- label: PostgreSQL
value: postgresql
- default: "/home/bitmagnet"
edit: true
envKey: BITMAGNET_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 3333
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: 3334
edit: true
envKey: PANEL_APP_PORT_BT
labelZh: BitTorrent 端口
labelEn: BitTorrent port
required: true
rule: paramPort
type: number
- default: "127.0.0.1:5432"
edit: true
envKey: POSTGRES_HOST
labelZh: 数据库 主机地址
labelEn: Database Host
required: true
type: text
- default: "bitmagnet"
edit: true
envKey: POSTGRES_NAME
labelZh: 数据库 名称
labelEn: Database Name
required: true
rule: paramCommon
type: text
- default: "bitmagnet"
edit: true
envKey: POSTGRES_USER
labelZh: 数据库 用户名
labelEn: Database Username
required: true
type: text
- default: ""
edit: true
envKey: POSTGRES_PASSWORD
labelZh: 数据库 密码
labelEn: Database Password
random: true
required: true
rule: paramComplexity
type: password
- default: "true"
edit: true
envKey: TMDB_ENABLED
labelZh: 获取 TMDB 元数据
labelEn: Fetch TMDB metadata
required: true
type: select
values:
- label: 允许
value: "true"
- label: 禁止
value: "false"
+36
View File
@@ -0,0 +1,36 @@
networks:
1panel-network:
external: true
services:
bitmagnet:
image: ghcr.io/bitmagnet-io/bitmagnet:v0.9.5
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:3333
- ${PANEL_APP_PORT_BT}:3334/tcp
- ${PANEL_APP_PORT_BT}:3334/udp
env_file:
- /etc/1panel/envs/global.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${BITMAGNET_ROOT_PATH}/config:/root/.config/bitmagnet
- ${BITMAGNET_ROOT_PATH}/bitmagnet:/root/.local/share/bitmagnet
environment:
- LOG_FILE_ROTATOR_ENABLED=true
- LOG_LEVEL=info
- LOG_DEVELOPMENT=false
- LOG_JSON=false
- DHT_CRAWLER_SAVE_FILES_THRESHOLD=100
- PROCESSOR_CONCURRENCY=1
- TMDB_ENABLED=true
- TMDB_API_KEY=your_api_key
command:
- worker
- run
- --all
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi