mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2026-06-16 01:02:14 +08:00
Delete appstore directory
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
# 数据持久化路径 [必填]
|
||||
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
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
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
|
||||
@@ -1,33 +0,0 @@
|
||||
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: ""
|
||||
@@ -1,20 +0,0 @@
|
||||
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
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
ENV_FILE=.env
|
||||
@@ -1,2 +0,0 @@
|
||||
# copyright© 2024 XinJiang Ms Studio
|
||||
TZ=Asia/Shanghai
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/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
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f .env ]; then
|
||||
source .env
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
echo "Error: .env file not found."
|
||||
fi
|
||||
@@ -1,94 +0,0 @@
|
||||
# 哪吒监控
|
||||
|
||||
开源、轻量、易用的服务器监控、运维工具
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## OAuth2 配置
|
||||
|
||||
推荐使用 `Gitee` 或 `Gitea` 作为管理员账号登录,因为 `Github` 在中国大陆访问速度较慢。
|
||||
|
||||
### 获取 Github 的 Client ID 和密钥
|
||||
|
||||
哪吒监控接入 Github、Gitlab、Gitee 作为后台管理员账号
|
||||
|
||||
+ 新建一个验证应用
|
||||
以 Github 为例,登录 Github 后,打开 https://github.com/settings/developers
|
||||
+ 依次选择 “OAuth Apps” - “New OAuth App”
|
||||
+ Application name - 随意填写
|
||||
+ Homepage URL - 填写面板的访问域名,如:"http://dashboard.example.com" (你的域名)
|
||||
+ Authorization callback URL - 填写回调地址,如:"http://dashboard.example.com/oauth2/callback"
|
||||
(不要忘记/oauth2/callback)
|
||||
+ 点击 “Register application”
|
||||
+ 保存页面中的 Client ID,然后点击 “Generate a new client secret“,创建一个新的 Client Secret,新建的密钥仅会显示一次,请妥善保存
|
||||
|
||||
### 获取 Cloudflare Access 作为 OAuth2 提供方
|
||||
|
||||
位于中国大陆的用户可能无法直接连接 Github,如您在使用 Github、Gitlab、Gitee 作为管理员账户登录时遇到问题,您可以优先考虑切换
|
||||
使用 Cloudflare Access 作为 OAuth2 提供方作为登录方式
|
||||
|
||||
新建 SaaS-OIDC 应用流程
|
||||
|
||||
+ 前往 Zero Trust Dashboard,使用 Cloudflare 账号登录;
|
||||
+ My Team -> Users -> <具体用户> -> 获取 User ID 并保存;
|
||||
+ Access -> Application -> Add an Application;
|
||||
+ 选择 SaaS,在 Application 中输入自定义的应用名称(例如 nezha),选择 OIDC 后点击 Add application;
|
||||
+ Scopes 选择 openid, email, profile, groups;
|
||||
+ Redirect URLs 填写你的 callback 地址,例如 https://dashboard.example.com/oauth2/callback;
|
||||
+ 保存 Client ID、Client Secret、Issuer 地址中协议与域名的部分,例如 https://xxxxx.cloudflareaccess.com
|
||||
|
||||
> 使用此方式,安装 Dashboard,需要将 Endpoint 配置修改为之前保存的Issuer地址
|
||||
|
||||
## 反向代理
|
||||
|
||||
> Nginx
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8008;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
}
|
||||
|
||||
location ~ ^/(ws|terminal/.+)$ {
|
||||
proxy_pass http://127.0.0.1:8008;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
```
|
||||
|
||||
## 关于 Agent 安装
|
||||
|
||||
Agent 是哪吒监控的数据采集工具,用于采集服务器的性能数据,Agent 会将数据发送到哪吒监控的服务端
|
||||
|
||||
### 在 Linux(Ubuntu、Debian、CentOS) 中安装 Agent
|
||||
|
||||
+ 首先在管理面板中添加一台服务器
|
||||
+ 点击新添加的服务器旁,绿色的 Linux 图标按钮,复制一键安装命令
|
||||
+ 在被控端服务器中运行复制的一键安装命令,等待安装完成后返回到 Dashboard 主页查看服务器是否上线
|
||||
|
||||
### 在 Windows 中安装 Agent
|
||||
|
||||
参考文章: [哪吒探针 - Windows 客户端安装](https://nyko.me/2020/12/13/nezha-windows-client.html)
|
||||
|
||||
## DDNS 支持
|
||||
|
||||
哪吒监控支持 DDNS,可以在管理面板中添加 DDNS 配置即可修改配置文件。
|
||||
|
||||
如需手动修改配置文件,可以在 `/home/nezha/data/config.yaml` 中修改 `ddns` 配置。
|
||||
|
||||
其中 `/home/nezha` 为持久化路径,如果你的持久化路径不同,请自行替换。
|
||||
|
||||
## 常见问题
|
||||
|
||||
+ 修改配置重建不生效
|
||||
|
||||
请前往持久化目录下的 `data` 目录中的 `config.yaml` 修改配置后,然后重启容器
|
||||
|
||||
---
|
||||
|
||||

|
||||
@@ -1,15 +0,0 @@
|
||||
additionalProperties:
|
||||
key: nezha
|
||||
name: 哪吒监控
|
||||
tags:
|
||||
- WebSite
|
||||
- DevOps
|
||||
- Local
|
||||
shortDescZh: 开源、轻量、易用的服务器监控、运维工具
|
||||
shortDescEn: Open source, lightweight, easy-to-use server monitoring and operation and maintenance tools
|
||||
type: tool
|
||||
crossVersionUpdate: true
|
||||
limit: 0
|
||||
website: https://nezha.wiki/
|
||||
github: https://github.com/naiba/nezha/
|
||||
document: https://nezha.wiki/guide/dashboard.html
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 9.9 KiB |
Reference in New Issue
Block a user