Synced apps from source repository via GitHub Actions

This commit is contained in:
QYG2297248353
2024-12-04 03:08:24 +00:00
parent c472f6b912
commit e8d6cc738d
1394 changed files with 42558 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
# 数据持久化路径 [必填]
NEZHA_ROOT_PATH=/home/nezha
# WebUI 端口 [必填]
PANEL_APP_PORT_HTTP=8008
# gRPC 端口 [必填]
PANEL_APP_PORT_GRPC=5555
# OAuth 服务商 [必填]
OAUTH2_TYPE=github
# 管理员账号ID [必填]
OAUTH2_ADMIN=
# OAuth 客户端 ID [必填]
OAUTH2_CLIENTID=
# OAuth 客户端 Secret [必填]
OAUTH2_CLIENTSECRET=
# OAuth 端点 (可选)
OAUTH2_ENDPOINT=
# 网站标题 [必填]
NZ_SITE_TITLE=哪吒监控
# Cookie 名称 (默认) [必填]
NZ_COOKIE_NAME=nezha-dashboard
# 网站主题 (默认) [必填]
NZ_THEME=default
+94
View File
@@ -0,0 +1,94 @@
additionalProperties:
formFields:
- default: "/home/nezha"
edit: true
envKey: NEZHA_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 8008
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: 5555
edit: true
envKey: PANEL_APP_PORT_GRPC
labelZh: gRPC 端口
labelEn: gRPC Port
required: true
rule: paramPort
type: number
- default: "github"
edit: true
envKey: OAUTH2_TYPE
labelZh: OAuth 服务商
labelEn: OAuth Provider
required: true
type: select
values:
- label: GitHub
value: "github"
- label: Cloudflare
value: "cloudflare"
- label: GitLab
value: "gitlab"
- label: Gitee
value: "gitee"
- label: Gitea
value: "gitea"
- label: Jihulab
value: "jihulab"
- default: ""
edit: true
envKey: OAUTH2_ADMIN
labelZh: 管理员账号ID
labelEn: Admin Account ID
required: true
type: text
- default: ""
edit: true
envKey: OAUTH2_CLIENTID
labelEn: OAuth Client ID
labelZh: OAuth 客户端 ID
required: true
type: text
- default: ""
edit: true
envKey: OAUTH2_CLIENTSECRET
labelEn: OAuth Client Secret
labelZh: OAuth 客户端 Secret
required: true
type: text
- default: ""
edit: true
envKey: OAUTH2_ENDPOINT
labelEn: OAuth Callback
labelZh: OAuth 端点 (可选)
required: false
type: text
- default: "哪吒监控"
edit: true
envKey: NZ_SITE_TITLE
labelZh: 网站标题
labelEn: Site Title
required: true
type: text
- default: "nezha-dashboard"
edit: true
envKey: NZ_COOKIE_NAME
labelZh: Cookie 名称 (默认)
labelEn: Cookie Name
required: true
type: text
- default: "default"
edit: true
envKey: NZ_THEME
labelZh: 网站主题 (默认)
labelEn: Theme
required: true
type: text
@@ -0,0 +1,33 @@
debug: false
httpport: 80
language: zh-CN
grpcport: nz_grpc_port
oauth2:
type: "nz_oauth2_type"
admin: "nz_admin_logins"
clientid: "nz_github_oauth_client_id"
clientsecret: "nz_github_oauth_client_secret"
endpoint: ""
site:
brand: "nz_site_title"
cookiename: "nezha-dashboard"
theme: "default"
ddns:
enable: false
provider: "webhook"
accessid: ""
accesssecret: ""
webhookmethod: ""
webhookurl: ""
webhookrequestbody: ""
webhookheaders: ""
maxretries: 3
profiles:
example:
provider: ""
accessid: ""
accesssecret: ""
webhookmethod: ""
webhookurl: ""
webhookrequestbody: ""
webhookheaders: ""
+20
View File
@@ -0,0 +1,20 @@
networks:
1panel-network:
external: true
services:
nezha-dashboard:
container_name: nezha
image: ghcr.io/naiba/nezha-dashboard:v0.20.13
labels:
createdBy: Apps
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:80
- ${PANEL_APP_PORT_GRPC}:${PANEL_APP_PORT_GRPC}
restart: always
volumes:
- ${NEZHA_ROOT_PATH}/data:/dashboard/data
- ${NEZHA_ROOT_PATH}/static-custom/static:/dashboard/resource/static/custom
- ${NEZHA_ROOT_PATH}/theme-custom/template:/dashboard/resource/template/theme-custom
- ${NEZHA_ROOT_PATH}/dashboard-custom/template:/dashboard/resource/template/dashboard-custom
+2
View File
@@ -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
+26
View File
@@ -0,0 +1,26 @@
#!/bin/bash
if [[ -f .env ]]; then
source .env
mkdir -p $NEZHA_ROOT_PATH
mkdir -p $NEZHA_ROOT_PATH/data
cp -f ./data/config-example.yaml ./data/nezha-config.yaml
sed -i "s/grpcport: nz_grpc_port/grpcport: $PANEL_APP_PORT_GRPC/g" ./data/nezha-config.yaml
sed -i "s/type: \"nz_oauth2_type\"/type: \"$OAUTH2_TYPE\"/g" ./data/nezha-config.yaml
sed -i "s/admin: \"nz_admin_logins\"/admin: \"$OAUTH2_ADMIN\"/g" ./data/nezha-config.yaml
sed -i "s/clientid: \"nz_github_oauth_client_id\"/clientid: \"$OAUTH2_CLIENTID\"/g" ./data/nezha-config.yaml
sed -i "s/clientsecret: \"nz_github_oauth_client_secret\"/clientsecret: \"$OAUTH2_CLIENTSECRET\"/g" ./data/nezha-config.yaml
sed -i "s/endpoint: \"\"/endpoint: \"$OAUTH2_ENDPOINT\"/g" ./data/nezha-config.yaml
sed -i "s/brand: \"nz_site_title\"/brand: \"$NZ_SITE_TITLE\"/g" ./data/nezha-config.yaml
sed -i "s/cookiename: \"nezha-dashboard\"/cookiename: \"$NZ_COOKIE_NAME\"/g" ./data/nezha-config.yaml
sed -i "s/theme: \"default\"/theme: \"$NZ_THEME\"/g" ./data/nezha-config.yaml
cp -f ./data/nezha-config.yaml $NEZHA_ROOT_PATH/data/config.yaml
chmod -R 777 $NEZHA_ROOT_PATH
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
+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