Synced apps from source repository via GitHub Actions

This commit is contained in:
QYG2297248353
2025-05-16 21:19:28 +00:00
parent 28856623ce
commit cd1a9b124a
63 changed files with 8 additions and 8 deletions
+51
View File
@@ -0,0 +1,51 @@
# 数据持久化路径 [必填]
RUSTDESK_API_ROOT_PATH=/home/rustdesk-api
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=21114
# RustDesk 服务地址 [必填]
RUSTDESK_SERVER_URL=http://127.0.0.1
# 后台页面标题 [必填]
RUSTDESK_API_ADMIN_TITLE=RustDesk API Admin
# RustDesk API 密钥 [必填]
RUSTDESK_API_RUSTDESK_KEY=
# 登录有效期 [必填]
RUSTDESK_API_APP_TOKEN_EXPIRE=168h
# 启用 Web Client [必填]
RUSTDESK_API_APP_WEB_CLIENT=1
# 开启 Swagger 文档 [必填]
RUSTDESK_API_APP_SHOW_SWAGGER=1
# 启用注册 [必填]
RUSTDESK_API_APP_REGISTER=false
# 登录策略 [必填]
RUSTDESK_API_APP_DISABLE_PWD_LOGIN=false
# 启用代理 [必填]
RUSTDESK_API_PROXY_ENABLE=false
# 代理地址
RUSTDESK_API_PROXY_HOST=
# 数据库类型 [必填]
RUSTDESK_API_GORM_TYPE=sqlite
# 数据库地址
RUSTDESK_API_MYSQL_ADDR=127.0.0.1:3306
# 数据库 名称
RUSTDESK_API_MYSQL_DBNAME=rustdesk
# 数据库 用户名
RUSTDESK_API_MYSQL_USERNAME=rustdesk
# 数据库 密码
RUSTDESK_API_MYSQL_PASSWORD=
+5
View File
@@ -0,0 +1,5 @@
#!/command/with-contenv sh
cd /data || exit
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbr $PARAMS
+6
View File
@@ -0,0 +1,6 @@
#!/command/with-contenv sh
sleep 2
cd /data
PARAMS=
[ "${ENCRYPTED_ONLY}" = "1" ] && PARAMS="-k ${KEY}"
/usr/bin/hbbs -r $RELAY $PARAMS
+154
View File
@@ -0,0 +1,154 @@
additionalProperties:
formFields:
- default: "/home/rustdesk-api"
edit: true
envKey: RUSTDESK_API_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 21114
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: "http://127.0.0.1"
edit: true
envKey: RUSTDESK_SERVER_URL
labelZh: RustDesk 服务地址
labelEn: RustDesk server address
required: true
type: text
- default: "RustDesk API Admin"
edit: true
envKey: RUSTDESK_API_ADMIN_TITLE
labelZh: 后台页面标题
labelEn: Admin page title
required: true
type: text
- default: ""
edit: true
envKey: RUSTDESK_API_RUSTDESK_KEY
labelZh: RustDesk API 密钥
labelEn: RustDesk API key
required: true
type: password
- default: "168h"
edit: true
envKey: RUSTDESK_API_APP_TOKEN_EXPIRE
labelZh: 登录有效期
labelEn: Login validity period
required: true
type: text
- default: "1"
edit: true
envKey: RUSTDESK_API_APP_WEB_CLIENT
labelZh: 启用 Web Client
labelEn: Enable Web Client
required: true
type: select
values:
- label: 启用
value: "1"
- label: 禁用
value: "0"
- default: "1"
edit: true
envKey: RUSTDESK_API_APP_SHOW_SWAGGER
labelZh: 开启 Swagger 文档
labelEn: Enable Swagger docs
required: true
type: select
values:
- label: 启用
value: "1"
- label: 禁用
value: "0"
- default: "false"
edit: true
envKey: RUSTDESK_API_APP_REGISTER
labelZh: 启用注册
labelEn: Enable register
required: true
type: select
values:
- label: 启用
value: "true"
- label: 禁用
value: "false"
- default: "false"
edit: true
envKey: RUSTDESK_API_APP_DISABLE_PWD_LOGIN
labelZh: 登录策略
labelEn: Login strategy
required: true
type: select
values:
- label: 禁用密码登录
value: "true"
- label: 允许密码登录
value: "false"
- default: "false"
edit: true
envKey: RUSTDESK_API_PROXY_ENABLE
labelZh: 启用代理
labelEn: Enable proxy
required: true
type: select
values:
- label: 启用
value: "true"
- label: 禁用
value: "false"
- default: ""
edit: true
envKey: RUSTDESK_API_PROXY_HOST
labelZh: 代理地址
labelEn: Proxy address
required: false
type: text
- default: "sqlite"
edit: true
envKey: RUSTDESK_API_GORM_TYPE
labelZh: 数据库类型
labelEn: Database type
required: true
type: select
values:
- label: sqlite
value: "sqlite"
- label: MySQL
value: "false"
- default: "127.0.0.1:3306"
edit: true
envKey: RUSTDESK_API_MYSQL_ADDR
labelZh: 数据库地址
labelEn: Database Host
required: false
type: text
- default: "rustdesk"
edit: true
envKey: RUSTDESK_API_MYSQL_DBNAME
labelZh: 数据库 名称
labelEn: Database Name
required: false
rule: paramCommon
type: text
- default: "rustdesk"
edit: true
envKey: RUSTDESK_API_MYSQL_USERNAME
labelZh: 数据库 用户名
labelEn: Database Username
required: false
type: text
- default: ""
edit: true
envKey: RUSTDESK_API_MYSQL_PASSWORD
labelZh: 数据库 密码
labelEn: Database Password
required: false
rule: paramComplexity
type: password
@@ -0,0 +1,54 @@
networks:
1panel-network:
external: true
services:
rustdesk-api:
container_name: rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RUSTDESK_API_RUSTDESK_ID_SERVER=${RUSTDESK_SERVER_URL}:21116
- RUSTDESK_API_RUSTDESK_RELAY_SERVER=${RUSTDESK_SERVER_URL}:21117
- RUSTDESK_API_RUSTDESK_API_SERVER=${RUSTDESK_SERVER_URL}:${PANEL_APP_PORT_HTTP:-21114}
- RUSTDESK_API_RUSTDESK_KEY=${KEY}
image: lejianwen/rustdesk-api:v2.6.20
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:21114
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
rustdesk-server-s6:
container_name: server-rustdesk-api
env_file:
- ./envs/global.env
- .env
environment:
- TZ=Asia/Shanghai
- RUSTDESK_API_LANG=zh-CN
- RELAY=${RUSTDESK_SERVER_URL}:21117
- ENCRYPTED_ONLY=1
- RUSTDESK_API_RUSTDESK_KEY=${KEY}
image: rustdesk/rustdesk-server-s6:latest
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
- 21117:21117
- 21118:21118
- 21119:21119
restart: always
volumes:
- ${RUSTDESK_API_ROOT_PATH}/data:/data
- ${HBBR_RUN_FILE:-./conf/hbbr/run}:/etc/s6-overlay/s6-rc.d/hbbr/run
- ${HBBS_RUN_FILE:-./conf/hbbs/run}:/etc/s6-overlay/s6-rc.d/hbbs/run
@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env
+2
View File
@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai
+19
View File
@@ -0,0 +1,19 @@
#!/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 "HBBR_RUN_FILE=${CURRENT_DIR}/conf/hbbr/run" >> .env
echo "HBBS_RUN_FILE=${CURRENT_DIR}/conf/hbbs/run" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi
@@ -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