1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-03-18 01:01:02 +08:00

Merge branch 'Jasonzhu1207-1Panel-AppStore/only-apps' into patch/localApps

This commit is contained in:
pooneyy 2025-07-01 18:22:08 +08:00
commit 0e745d5d52
6 changed files with 299 additions and 73 deletions

131
apps/komari/README.md Normal file
View File

@ -0,0 +1,131 @@
# Komari
Komari 是一款轻量级的自托管服务器监控工具,旨在提供简单、高效的服务器性能监控解决方案。它支持通过 Web 界面查看服务器状态,并通过轻量级 Agent 收集数据。
[文档](https://komari-monitor.github.io/komari-document/)
## 特性
- **轻量高效**:低资源占用,适合各种规模的服务器。
- **自托管**:完全掌控数据隐私,部署简单。
- **Web 界面**:直观的监控仪表盘,易于使用。
## 快速开始
### 依赖
- Docker快速部署
- 或者 Go 1.18+ 和 Node.js 20+(手工构建)
### Docker 部署
1. 创建数据目录:
```bash
mkdir -p ./data
```
2. 运行 Docker 容器:
```bash
docker run -d \
-p 25774:25774 \
-v $(pwd)/data:/app/data \
--name komari \
ghcr.io/komari-monitor/komari:latest
```
3. 查看默认账号和密码:
```bash
docker logs komari
```
4. 在浏览器中访问 `http://<your_server_ip>:25774`
> [!NOTE]
> 你也可以通过环境变量 `ADMIN_USERNAME``ADMIN_PASSWORD` 自定义初始用户名和密码。
### 二进制文件部署
1. 访问 Komari 的 [GitHub Release 页面](https://github.com/komari-monitor/komari/releases) 下载适用于你操作系统的最新二进制文件。
2. 运行 Komari
```bash
./komari server -l 0.0.0.0:25774
```
3. 在浏览器中访问 `http://<your_server_ip>:25774`,默认监听 `25774` 端口。
4. 默认账号和密码可在启动日志中查看,或通过环境变量 `ADMIN_USERNAME``ADMIN_PASSWORD` 设置。
> [!NOTE]
> 确保二进制文件具有可执行权限(`chmod +x komari`)。数据将保存在运行目录下的 `data` 文件夹中。
### 手工构建
1. 构建前端静态文件:
```bash
git clone https://github.com/komari-monitor/komari-web
cd komari-web
npm install
npm run build
```
2. 构建后端:
```bash
git clone https://github.com/komari-monitor/komari
cd komari
```
将步骤1中生成的静态文件复制到 `komari` 项目根目录下的 `/public/dist` 文件夹。
```bash
go build -o komari
```
4. 运行:
```bash
./komari server -l 0.0.0.0:25774
```
默认监听 `25774` 端口,访问 `http://localhost:25774`
## 前端开发指南
这个坑晚点再填吧 ヽ( ̄ω ̄( ̄ω ̄〃)ゝ
## 客户端 Agent 开发指南
这个坑晚点再填吧 (o゜▽゜)o☆
## 贡献
欢迎提交 Issue 或 Pull Request
## 鸣谢
- 感谢我自己能这么闲
## 引用
- [gorm.io](https://gorm.io/)
- [spf13/cobra](https://github.com/spf13/cobra)
- [oschwald/maxminddb-golang](https://github.com/oschwald/maxminddb-golang)
- [gorilla/websocket](https://github.com/gorilla/websocket)
- [google/uuid](https://github.com/google/uuid)
- [gin-gonic/gin](https://github.com/gin-gonic/gin)
- [UserExistsError/conpty](https://github.com/UserExistsError/conpty)
- [creack/pty](https://github.com/creack/pty)
- [rhysd/go-github-selfupdate](https://github.com/rhysd/go-github-selfupdate)
- [shirou/gopsutil](https://github.com/shirou/gopsutil)
## 许可证
[MIT License](LICENSE)
## 截图
![PixPin_2025-06-07_15-28-30](https://github.com/user-attachments/assets/edce5694-c6c8-4647-bc11-8b27105fd55c)
![PixPin_2025-06-07_15-28-49](https://github.com/user-attachments/assets/23b58032-211a-4b59-b444-c8267606a0bb)
![PixPin_2025-06-07_15-29-05](https://github.com/user-attachments/assets/f4325d4d-fa69-41c6-9251-19f530476e65)
![PixPin_2025-06-07_15-30-05](https://github.com/user-attachments/assets/69be38f6-6681-4afb-9a04-965d39b7fcc2)
![PixPin_2025-06-07_15-30-46](https://github.com/user-attachments/assets/01d84dd1-3c81-4424-a041-7dbc2ae5822e)
## 碎碎念
### 我为什么做Komari
起因: [求推荐系统监控软件](https://www.nodeseek.com/post-133745-1)
> @古xx斯
> 哪吒?
> > 数据至少保存15天
> @sxxu
> 怕不是做梦的预算
> @Vxxn
> prometheus加grafana
> > 部署太麻烦
没有合适的,最近刚好时间稍微多了一些,就搓了 komari.

38
apps/komari/data.yml Normal file
View File

@ -0,0 +1,38 @@
# 在应用商店列表顶部显示的应用名称
name: Komari
# 中文标签
tags:
- 工具
# 鼠标悬浮在应用上时显示的标题
title: 轻量级的服务器状态监控工具
# 应用详情页的完整描述
description: Komari 是一个轻量级的服务器状态监控工具,界面美观,易于部署。
# 应用的核心属性
additionalProperties:
# 应用的唯一英文ID用于创建文件夹等
key: komari
# 应用名称
name: Komari
# 英文标签
tags:
- Tool
# 中文短描述
shortDescZh: 一个轻量级的服务器状态监控工具。
# 英文短描述
shortDescEn: A lightweight server status monitoring tool.
# 应用类型, 'tool' | 'website' | 'runtime'
type: tool
# 是否允许跨版本升级
crossVersionUpdate: true
# 允许安装的数量限制, 0 代表无限制
limit: 0
# 官网地址
website: https://github.com/komari-monitor/komari
# Github 地址
github: https://github.com/komari-monitor/komari
# 文档地址
document: https://github.com/komari-monitor/komari
# 支持的 CPU 架构
architectures:
- amd64
- arm64

View File

@ -0,0 +1,35 @@
# additionalProperties 是固定写法
additionalProperties:
# formFields 定义了安装时需要填写的表单字段
formFields:
# 字段1: 端口配置
- default: 25774
edit: true
# 修正:使用驼峰命名的 envKey
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 应用端口
required: true
rule: paramPort
type: number
# 字段2: 用户名配置
- default: admin
edit: true
# 修正:使用驼峰命名的 envKey
envKey: ADMIN_USERNAME
labelEn: Admin Username
labelZh: 管理员用户名
required: true
rule: paramCommon
type: text
# 字段3: 密码配置
- default: changeme
edit: true
# 修正:使用驼峰命名的 envKey
envKey: ADMIN_PASSWORD
labelEn: Admin Password
labelZh: 管理员密码
random: true
required: true
rule: paramComplexity
type: password

View File

@ -0,0 +1,22 @@
version: "3"
services:
komari:
image: ghcr.io/komari-monitor/komari:latest
container_name: ${CONTAINER_NAME}
restart: always
ports:
- "${PANEL_APP_PORT_HTTP}:25774"
volumes:
- ./data:/app/data
# 使用更明确的 YAML 数组格式定义环境变量
environment:
- "ADMIN_USERNAME=${ADMIN_USERNAME}"
- "ADMIN_PASSWORD=${ADMIN_PASSWORD}"
networks:
- 1panel-network
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

BIN
apps/komari/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB