📝 部署部分文档优化

This commit is contained in:
snowy 2024-06-19 12:34:38 +08:00
parent c657781599
commit 9fbded7d6a
3 changed files with 42 additions and 32 deletions

View File

@ -18,4 +18,8 @@ code {
.vp-hero-image{ .vp-hero-image{
overflow: hidden; overflow: hidden;
padding: -50px; padding: -50px;
}
#main-title{
display: none;
} }

View File

@ -8,11 +8,11 @@ bgImageDark:
bgImageStyle: bgImageStyle:
background-attachment: fixed background-attachment: fixed
heroText: LiteyukiBot heroText: LiteyukiBot
tagline: 轻雪机器人一个以轻量和简洁为设计理念基于Nonebot2的OneBot标准聊天机器人 tagline: LiteyukiBot 轻雪机器人基于NoneBot2构建的综合应用型聊天机器人
actions: actions:
- text: 快速部署 - text: 快速部署
icon: lightbulb icon: rocket
link: ./deployment/install.html link: ./deployment/install.html
type: primary type: primary
@ -30,18 +30,14 @@ highlights:
background-repeat: repeat background-repeat: repeat
background-size: initial background-size: initial
features: features:
- title: 基于Nonebot2 - title: 基于NoneBot2
icon: robot icon: robot
details: 拥有良好的生态支持 details: 拥有良好的生态支持
link: https://nonebot.dev/ link: https://nonebot.dev/
- title: 便捷插件管理 - title: 便捷管理
icon: plug icon: plug
details: 使用<code>包管理器</code>,无需命令行操作即可安装/卸载插件 details: 自带包管理器,便捷管理插件/资源包
- title: 人性化交互
icon: mouse-pointer
details: 新的点击交互模式,拒绝手打指令
- title: 主题支持 - title: 主题支持
icon: paint-brush icon: paint-brush
@ -53,14 +49,14 @@ highlights:
details: 通过资源包支持多种语言 details: 通过资源包支持多种语言
link: https://baike.baidu.com/item/i18n/6771940 link: https://baike.baidu.com/item/i18n/6771940
- title: 简易配置 - title: 简易使用
icon: cog icon: cog
details: 无需繁琐前期过程,开箱即用 details: 无需繁琐前期过程,开箱即用
link: https://bot.liteyuki.icu/deployment/config.html link: https://bot.liteyuki.icu/deployment/config.html
- title: 超高性能 - title: 超高性能
icon: tachometer-alt icon: tachometer-alt
details: 500个插件3s内启动 details: 500个插件2s内启动
- title: 滚动更新 - title: 滚动更新
icon: cloud-download icon: cloud-download
@ -68,7 +64,7 @@ highlights:
- title: 开源项目 - title: 开源项目
icon: code icon: code
details: 项目遵循MIT协议开源,欢迎各位的贡献 details: 项目遵循MIT LICENCE开源,欢迎各位的贡献
- header: 快速部署 - header: 快速部署
image: /assets/image/box.svg image: /assets/image/box.svg
@ -76,8 +72,8 @@ highlights:
bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg bgImageDark: https://theme-hope-assets.vuejs.press/bg/3-dark.svg
highlights: highlights:
- title: 安装 Git 和 Python3.10+ - title: 安装 Git 和 Python3.10+
- title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot</code> 以克隆项目至本地。 - title: 使用 <code>git clone https://github.com/snowykami/LiteyukiBot --depth=1</code> 以克隆项目至本地。
details: 如果无法连接到GitHub可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot</code> details: 如果无法连接到GitHub可以使用 <code>git clone https://gitee.com/snowykami/LiteyukiBot --depth=1</code>
- title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。 - title: 使用 <code>cd LiteyukiBot</code> 切换到项目目录。
- title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。 - title: 使用 <code>pip install -r requirements.txt</code> 安装项目依赖。
details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code> details: 如果你有多个 Python 环境,请使用 <code>pythonx -m pip install -r requirements.txt</code>

View File

@ -7,44 +7,54 @@ tag:
- 安装 - 安装
--- ---
## **开始安装** ## **开始安装**
### **常规方法**
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
3. 进入轻雪目录 `cd LiteyukiBot`
4. 安装依赖 `pip install -r requirements.txt`
5. 启动 `python main.py`
### **使用Docker(测试中)** ### **常规部署**
1. 安装 [`Git`](https://git-scm.com/download/) 和 [`Python3.10+`](https://www.python.org/downloads/release/python-31010/) 环境
```bash
# 克隆项目到本地轻雪使用Git进行版本管理该步骤为必要项
git clone https://github.com/snowykami/LiteyukiBot --depth=1
# 切换到Bot目录下
cd LiteyukiBot
# 安装依赖
pip install -r requirements.txt
# 启动Bot
python main.py
```
> [!tip]
> 推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用`python -m venv venv`来创建虚拟环境,然后使用`venv\Scripts\activate`来激活虚拟环境
### **使用Docker构建镜像部署**
1. 安装 [`Docker`](https://docs.docker.com/get-docker/) 1. 安装 [`Docker`](https://docs.docker.com/get-docker/)
2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot` 2. 克隆项目 `git clone https://github.com/snowykami/LiteyukiBot`
3. 进入轻雪目录 `cd LiteyukiBot` 3. 进入轻雪目录 `cd LiteyukiBot`
4. 构建镜像 `docker build -t liteyukibot .` 4. 构建镜像 `docker build -t liteyukibot .`
5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot` 5. 启动容器 `docker run -p 20216:20216 -v $(pwd):/liteyukibot -v $(pwd)/.cache:/root/.cache liteyukibot`
> [!tip] > [!tip]
> Windows请使用项目绝对目录`/path/to/LiteyukiBot`代替`$(pwd)` <br> > Windows请使用项目绝对目录`/path/to/LiteyukiBot`代替`$(pwd)` <br>
> 若你修改了端口号请将`20216:20216`中的`20216`替换为你的端口号 > 若你修改了端口号请将`20216:20216`中的`20216`替换为你的端口号
### **使用TRSS Scripts部署**
[TRSS_Liteyuki轻雪机器人管理脚本](https://timerainstarsky.github.io/TRSS_Liteyuki/)该功能由TRSS提供支持不是LiteyukiBot官方提供的功能推荐使用`Arch Linux`
## **设备要求** ## **设备要求**
- Windows系统版本最低`Windows10+`/`Windows Server 2019+` - Windows系统版本最低`Windows10+`/`Windows Server 2019+`
- Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~) - Linux系统要支持Python3.10+,推荐`Ubuntu 20.04+`(~~别用你那b CentOS~~)
- CPU: 至少`1vCPU` - CPU: 至少`1vCPU`
- 内存: Bot无其他插件会占用`200~300MB`,其他插件占用视具体插件而定,建议`1GB`以上 - 内存: Bot无其他插件会占用`300~500MB`,包括`chromium` `node`等进程,其他插件占用视具体插件而定,建议`1GB`以上
- 硬盘: 至少`1GB`空间 - 硬盘: 至少`1GB`空间
> [!warning] > [!warning]
> 如果设备上有多个环境,请使用`path/to/python -m pip install -r requirements.txt`来安装依赖,`path/to/python`为你的Python可执行文件路径 > 如果设备上有多个环境,请使用`path/to/python -m pip install -r requirements.txt`来安装依赖,`path/to/python`为你的Python可执行文件路径
> [!tip]
> 推荐使用虚拟环境来运行轻雪,以避免依赖冲突,你可以使用`python -m venv venv`来创建虚拟环境,然后使用`venv\Scripts\activate`来激活虚拟环境
> [!warning] > [!warning]
> 轻雪的更新功能依赖Git如果你没有安装Git你将无法使用更新功能 > 轻雪的更新功能依赖Git如果你没有安装Git直接下载源代码运行你将无法使用更新功能
#### 其他问题请移步至[答疑](/deployment/fandq) #### 其他问题请移步至[答疑](/deployment/fandq)
[//]: # (#### 想在Linux命令行中拥有更好的体验试试[TRSS_Liteyuki轻雪机器人管理脚本]&#40;https://timerainstarsky.github.io/TRSS_Liteyuki/&#41;该功能仅供参考不是LiteyukiBot官方提供的功能)