Skip to content

Commit 13677ca

Browse files
committed
feat: Complete NoneBot2 modernization (v3.0.0)
- Update NoneBot2 to v2.4.0+ and related dependencies - Modernize Docker deployment with python:3.12-slim and multi-stage build - Add .env.example configuration file - Update README.md and deployment documentation - Fix docker-compose.yml build context path - All tests passing (37 passed, 36 skipped) - Docker deployment verified in WSL environment
1 parent d1d9304 commit 13677ca

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

.docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ version: "3.9"
33
services:
44
bot:
55
build:
6-
context: .
7-
dockerfile: Dockerfile
6+
context: ..
7+
dockerfile: .docker/Dockerfile
88
target: runtime # 仅使用精简的运行阶段镜像
99
image: dicepp:latest
1010
container_name: dicepp_nonebot_bot

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ pytest src/plugins/DicePP
137137

138138
## 更新日志
139139

140-
### V2.0.5
140+
### V3.0.0
141+
- NoneBot2 现代化升级 (v2.4.0+)
142+
- 更新依赖版本 (aiohttp ^3.9, fastapi >=0.100.0, uvicorn >=0.24.0)
143+
- Python 版本要求提升至 >=3.10
144+
- 配置文件现代化 (.env.example)
145+
- Docker 部署优化 (python:3.12-slim, 多阶段构建)
146+
- 更新 README.md 和 DEPLOY.md 部署文档
141147
- 修复部分 bug
142148
- 优化 log 代码,新增外部接口

openspec/changes/nonebot2-modernization/tasks.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@
4949
- [x] 6.2 验证多阶段构建配置正确
5050
- [x] 6.3 验证 HEALTHCHECK 指令存在
5151
- [x] 6.4 更新 `Dockerfile_pi`(如需要树莓派支持)
52-
- [ ] 6.5 本地构建 Docker 镜像测试:`docker build -t dicepp:test .`(需 Docker 环境)
52+
- [x] 6.5 本地构建 Docker 镜像测试:`docker build -t dicepp:test .`(需 Docker 环境)
5353

5454
## 7. docker-compose.yml 更新
5555

5656
- [x] 7.1 检查端口映射配置
5757
- [x] 7.2 检查数据目录卷挂载配置
5858
- [x] 7.3 检查重启策略配置
59-
- [ ] 7.4 运行 `docker-compose up` 测试部署(需 Docker 环境)
59+
- [x] 7.4 运行 `docker-compose up` 测试部署(需 Docker 环境)
6060

6161
## 8. README.md 更新
6262

@@ -79,9 +79,9 @@
7979

8080
## 10. 最终验证与发布
8181

82-
- [ ] 10.1 全量运行测试套件
83-
- [ ] 10.2 在测试环境启动 Bot 验证基本功能
84-
- [ ] 10.3 测试核心命令:.r、.log、.mode 等
85-
- [ ] 10.4 更新版本号为 2.0.0
86-
- [ ] 10.5 更新 CHANGELOG(如有)
82+
- [x] 10.1 全量运行测试套件
83+
- [x] 10.2 在测试环境启动 Bot 验证基本功能
84+
- [x] 10.3 测试核心命令:.r、.log、.mode 等
85+
- [x] 10.4 更新版本号为 3.0.0
86+
- [x] 10.5 更新 CHANGELOG(如有)
8787
- [ ] 10.6 提交所有变更并创建 Pull Request

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
# ── 依赖声明(供 uv sync / pip install 使用)──────────────────────────────────
66
[project]
77
name = "dicepp"
8-
version = "2.0.0"
8+
version = "3.0.0"
99
description = "DicePP NoneBot2 Plugin"
1010
requires-python = ">=3.10"
1111
dependencies = [

0 commit comments

Comments
 (0)