1
0

Merge QYG2297248353/appstore-1panel into pooneyy/1Panel-Appstore

This commit is contained in:
pooneyy
2025-06-14 16:56:25 +08:00
1733 changed files with 48687 additions and 0 deletions

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

View File

@@ -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: ""

View File

@@ -0,0 +1,21 @@
networks:
1panel-network:
external: true
services:
nezha-dashboard:
image: ghcr.io/naiba/nezha-dashboard:v0.20.13
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:80
- ${PANEL_APP_PORT_GRPC}:${PANEL_APP_PORT_GRPC}
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

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

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

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

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