Skip to content

Commit e8e0ddf

Browse files
committed
docs: 添加 1Panel 应用描述的使用方式
1 parent ef6ed05 commit e8e0ddf

8 files changed

Lines changed: 154 additions & 0 deletions

File tree

deploy/1panel/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# 1Panel 部署 OneBots
2+
3+
本目录提供与 [1Panel 应用商店](https://github.com/1Panel-dev/appstore) 相同布局的 **`onebots`** 应用描述,便于一键安装或向官方商店提交 PR。
4+
5+
## 目录说明
6+
7+
```
8+
onebots/
9+
├── data.yml # 应用元数据(名称、标签、架构等)
10+
├── logo.png # 列表图标
11+
├── README.md # 应用商店内说明
12+
└── 0.5.0/ # 与镜像版本对应的目录(发新版时复制并改镜像标签)
13+
├── data.yml # 安装表单(端口等)
14+
└── docker-compose.yml
15+
```
16+
17+
发新版时:新增目录 `x.y.z/`,将 `docker-compose.yml` 中镜像改为 `ghcr.io/<owner>/onebots:x.y.z`(或与 CI 实际打的 tag 一致,例如 `master`)。
18+
19+
## 在 1Panel 中使用
20+
21+
### 方式 A:本地 Compose(最快)
22+
23+
1. 打开 **容器 → Compose → 创建编排**
24+
2.`onebots/0.5.0/docker-compose.yml` 内容粘贴进编辑器(或选择本仓库目录下的该文件)
25+
3. 在 1Panel 中设置 **端口**(映射到容器 **6727**)与 **数据卷**(挂载到容器 **`/data`**,用于 `config.yaml`、数据库等)
26+
4. 网络选用 **`1panel-network`**(与面板其他应用一致;若不存在可改为 `bridge` 并去掉 `external: true`
27+
28+
镜像默认:`ghcr.io/lc-cn/onebots:0.5.0`。若该 tag 尚未推送,可改为 `ghcr.io/lc-cn/onebots:master`(以你仓库 CI 实际产物为准)。
29+
30+
### 方式 B:第三方应用商店源
31+
32+
1. 将本仓库(或仅 `deploy/1panel/`)托管为 Git 仓库
33+
2. 在 1Panel **应用商店 → 设置** 中添加该源(需符合 1Panel 对应用源目录结构的要求)
34+
3. 在商店中安装 **OneBots**
35+
36+
### 方式 C:合并进官方 appstore
37+
38+
[1Panel-dev/appstore](https://github.com/1Panel-dev/appstore) 提交 PR,将 `onebots/` 复制到其 `apps/onebots/`,并遵循官方贡献说明(镜像需公开可拉取、维护活跃度等)。
39+
40+
## 说明
41+
42+
- 首次启动容器会在 **`/data`** 下自动生成 **`config.yaml`**(由镜像 entrypoint 从示例复制),请在面板或 SSH 中编辑后重启容器。
43+
- 默认 CMD 已注册多类适配器与协议;可按需改为挂载自定义命令或自建镜像。
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
additionalProperties:
2+
formFields:
3+
- default: 6727
4+
edit: true
5+
envKey: PANEL_APP_PORT_HTTP
6+
labelEn: Gateway HTTP port
7+
labelZh: 网关 HTTP 端口
8+
label:
9+
en: Gateway HTTP port
10+
zh: 网关 HTTP 端口
11+
es-es: Puerto HTTP del gateway
12+
zh-Hant: 閘道 HTTP 埠
13+
ja: ゲートウェイ HTTP ポート
14+
ko: 게이트웨이 HTTP 포트
15+
ms: Port HTTP gerbang
16+
pt-br: Porta HTTP do gateway
17+
ru: HTTP-порт шлюза
18+
tr: Ağ geçidi HTTP bağlantı noktası
19+
required: true
20+
rule: paramPort
21+
type: number
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# OneBots — 与根目录 Dockerfile / docker-entrypoint.sh 一致:配置与数据在 /data
2+
services:
3+
onebots:
4+
image: ghcr.io/lc-cn/onebots:0.5.0
5+
container_name: ${CONTAINER_NAME}
6+
restart: always
7+
networks:
8+
- 1panel-network
9+
ports:
10+
- "${PANEL_APP_PORT_HTTP}:6727"
11+
volumes:
12+
- ./data:/data
13+
labels:
14+
createdBy: "Apps"
15+
16+
networks:
17+
1panel-network:
18+
external: true

deploy/1panel/onebots/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OneBots
2+
3+
[OneBots](https://github.com/lc-cn/onebots)**TypeScript / Node.js** 的多平台、多协议即时通讯机器人框架,可作为网关将 QQ、微信、Discord、Telegram、飞书、企业微信等接入 **OneBot v11/v12、Satori、Milky** 等协议。
4+
5+
## 使用说明
6+
7+
- **数据目录**:请将宿主机目录挂载到容器 **`/data`**,内含 `config.yaml`、SQLite 数据库等。
8+
- **首次启动**:若 `/data/config.yaml` 不存在,镜像会自动从内置示例复制一份,请按需修改(账号、协议端口、Token 等)后重启。
9+
- **Web 管理**:默认监听 **`6727`**,安装时在面板中映射该端口即可访问(具体路径见你所启用的协议配置)。
10+
11+
## 镜像
12+
13+
默认使用 **`ghcr.io/lc-cn/onebots:<版本>`**。若需跟踪最新构建,可将 compose 中镜像 tag 改为 CI 实际推送的分支 tag(如 `master`)。
14+
15+
## 文档
16+
17+
仓库内 [Docker 说明](../../../docs/src/guide/docker.md)[快速开始](https://github.com/lc-cn/onebots)

deploy/1panel/onebots/README_en.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# OneBots
2+
3+
[OneBots](https://github.com/lc-cn/onebots) is a **TypeScript / Node.js** framework and gateway for multi-platform, multi-protocol instant-messaging bots. It bridges QQ, WeChat, Discord, Telegram, Feishu, WeCom and more to **OneBot v11/v12, Satori, Milky**, etc.
4+
5+
## Usage
6+
7+
- **Data directory**: Mount a host path to **`/data`** in the container (`config.yaml`, SQLite, etc.).
8+
- **First run**: If `/data/config.yaml` is missing, the image copies a sample file; edit it and restart.
9+
- **Web UI**: Default port **`6727`** — map it in 1Panel (exact paths depend on enabled protocols).
10+
11+
## Image
12+
13+
Default: **`ghcr.io/lc-cn/onebots:<version>`**. Use your CI tag (e.g. `master`) if a semver tag is not published yet.
14+
15+
## Docs
16+
17+
[Docker guide](../../../docs/src/guide/docker.md) in this repository.

deploy/1panel/onebots/data.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: onebots
2+
tags:
3+
- 开发工具
4+
title: OneBots 多平台机器人网关
5+
description: 多平台、多协议(OneBot / Satori / Milky 等)即时通讯机器人应用框架与网关
6+
additionalProperties:
7+
key: onebots
8+
name: OneBots
9+
tags:
10+
- DevTools
11+
shortDescZh: 多平台多协议 IM 机器人网关
12+
shortDescEn: Multi-platform multi-protocol IM bot gateway
13+
description:
14+
en: OneBots connects QQ, WeChat, Discord, Telegram, Feishu and more to OneBot, Satori, Milky and other protocols.
15+
zh: OneBots 将 QQ、微信、Discord、Telegram、飞书等平台接入 OneBot、Satori、Milky 等协议。
16+
ja: 複数のIMプラットフォームをOneBot/Satori等のプロトコルに接続するゲートウェイです。
17+
ko: 여러 IM 플랫폼을 OneBot, Satori 등 프로토콜에 연결하는 게이트웨이입니다.
18+
zh-Hant: 多平台多協定 IM 機器人閘道。
19+
es-es: Puerta de enlace multiplataforma para bots de mensajería instantánea.
20+
ms: Gerbang bot IM pelbagai platform dan protokol.
21+
pt-br: Gateway de bots de mensagens multiplataforma e multiprotocolo.
22+
ru: Шлюз мультиплатформенных ботов для мгновенных сообщений.
23+
tr: Çoklu platform ve protokol için anlık mesaj botu ağ geçidi.
24+
type: website
25+
crossVersionUpdate: true
26+
limit: 0
27+
recommend: 0
28+
batchInstallSupport: true
29+
website: https://github.com/lc-cn/onebots
30+
github: https://github.com/lc-cn/onebots
31+
document: https://github.com/lc-cn/onebots#readme
32+
architectures:
33+
- amd64
34+
- arm64

deploy/1panel/onebots/logo.png

136 Bytes
Loading

docs/src/guide/docker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ docker logs -f onebots
6363
docker stop onebots && docker rm onebots
6464
```
6565

66+
### 方式三:1Panel
67+
68+
仓库内提供与 [1Panel 应用商店](https://github.com/1Panel-dev/appstore) 相同布局的应用描述(`data.yml``docker-compose.yml`、表单端口等),便于在面板中一键编排或向官方应用库投稿。说明见 **[deploy/1panel](../../../deploy/1panel/README.md)**
69+
6670
## 使用 GitHub 构建的镜像
6771

6872
若仓库已配置 [GitHub Actions 构建 Docker 镜像](https://github.com/lc-cn/onebots/actions),可直接拉取 GHCR 镜像,无需本地构建:

0 commit comments

Comments
 (0)