mirror of
https://github.com/Xtao-Labs/QQ-GitHub-Bot.git
synced 2025-01-30 15:08:54 +00:00
⬆️ upgrade dependencies
This commit is contained in:
parent
284b41097b
commit
6a553d5e20
@ -2,7 +2,7 @@
|
|||||||
* @Author : yanyongyu
|
* @Author : yanyongyu
|
||||||
* @Date : 2020-09-10 17:11:45
|
* @Date : 2020-09-10 17:11:45
|
||||||
* @LastEditors : yanyongyu
|
* @LastEditors : yanyongyu
|
||||||
* @LastEditTime : 2021-09-11 17:46:15
|
* @LastEditTime : 2022-01-13 16:07:58
|
||||||
* @Description : README
|
* @Description : README
|
||||||
* @GitHub : https://github.com/yanyongyu
|
* @GitHub : https://github.com/yanyongyu
|
||||||
-->
|
-->
|
||||||
@ -25,9 +25,9 @@ GitHub Bot for QQ
|
|||||||
|
|
||||||
在项目目录下创建 `.env.prod` 文件以覆盖默认 `.env` 配置,配置项留空将会从环境变量寻找。
|
在项目目录下创建 `.env.prod` 文件以覆盖默认 `.env` 配置,配置项留空将会从环境变量寻找。
|
||||||
|
|
||||||
## 部署
|
## 独立部署
|
||||||
|
|
||||||
部署 `QQ-GitHub-Bot` 前,需要先行部署 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 并配置连接。
|
独立部署 `QQ-GitHub-Bot` 前,需要先行部署 [go-cqhttp](https://github.com/Mrs4s/go-cqhttp) 或其他 [OneBot V11 协议实现](https://11.onebot.dev/) 并配置连接。
|
||||||
|
|
||||||
配置连接的方法参考 `nonebot2` 文档: [配置协议端](https://v2.nonebot.dev/guide/cqhttp-guide.html#%E9%85%8D%E7%BD%AE-cqhttp-%E5%8D%8F%E8%AE%AE%E7%AB%AF-%E4%BB%A5-qq-%E4%B8%BA%E4%BE%8B)
|
配置连接的方法参考 `nonebot2` 文档: [配置协议端](https://v2.nonebot.dev/guide/cqhttp-guide.html#%E9%85%8D%E7%BD%AE-cqhttp-%E5%8D%8F%E8%AE%AE%E7%AB%AF-%E4%BB%A5-qq-%E4%B8%BA%E4%BE%8B)
|
||||||
|
|
||||||
|
6
bot.py
6
bot.py
@ -4,20 +4,20 @@
|
|||||||
@Author : yanyongyu
|
@Author : yanyongyu
|
||||||
@Date : 2020-09-10 17:12:05
|
@Date : 2020-09-10 17:12:05
|
||||||
@LastEditors : yanyongyu
|
@LastEditors : yanyongyu
|
||||||
@LastEditTime : 2021-03-06 21:55:25
|
@LastEditTime : 2022-01-13 16:10:11
|
||||||
@Description : Entry File of the Bot
|
@Description : Entry File of the Bot
|
||||||
@GitHub : https://github.com/yanyongyu
|
@GitHub : https://github.com/yanyongyu
|
||||||
"""
|
"""
|
||||||
__author__ = "yanyongyu"
|
__author__ = "yanyongyu"
|
||||||
|
|
||||||
import nonebot
|
import nonebot
|
||||||
from nonebot.adapters.cqhttp import Bot as CQHTTPBot
|
from nonebot.adapters.onebot.v11 import Adapter as ONEBOT_V11_Adapter
|
||||||
|
|
||||||
nonebot.init()
|
nonebot.init()
|
||||||
app = nonebot.get_asgi()
|
app = nonebot.get_asgi()
|
||||||
|
|
||||||
driver = nonebot.get_driver()
|
driver = nonebot.get_driver()
|
||||||
driver.register_adapter("cqhttp", CQHTTPBot)
|
driver.register_adapter(ONEBOT_V11_Adapter)
|
||||||
|
|
||||||
config = driver.config
|
config = driver.config
|
||||||
nonebot.load_all_plugins(set(config.plugins), set(config.plugin_dirs))
|
nonebot.load_all_plugins(set(config.plugins), set(config.plugin_dirs))
|
||||||
|
51
docker-compose.full.yml
Normal file
51
docker-compose.full.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
version: "2"
|
||||||
|
services:
|
||||||
|
redis:
|
||||||
|
image: redis:6.2
|
||||||
|
container_name: bot_redis
|
||||||
|
command: redis-server --appendonly yes
|
||||||
|
volumes:
|
||||||
|
- bot_redis_data:/data
|
||||||
|
networks:
|
||||||
|
- bot_net
|
||||||
|
restart: always
|
||||||
|
go-cqhttp:
|
||||||
|
image: ghcr.io/mrs4s/go-cqhttp:1.0.0-beta8-fix2
|
||||||
|
container_name: bot_cqhttp
|
||||||
|
volumes:
|
||||||
|
- "./bot:/data"
|
||||||
|
networks:
|
||||||
|
- bot_net
|
||||||
|
restart: always
|
||||||
|
nonebot:
|
||||||
|
image: cscs181/qq-github-bot:latest # docker hub
|
||||||
|
# image: ghcr.io/cscs181/qq-github-bot:latest # github image mirror
|
||||||
|
# build: . # use "build" instead of "image" if you want to build the image yourself
|
||||||
|
container_name: bot
|
||||||
|
# volumes:
|
||||||
|
# - "/etc/timezone:/etc/timezone:ro"
|
||||||
|
# - "/etc/localtime:/etc/localtime:ro"
|
||||||
|
ports:
|
||||||
|
- "$PORT:$PORT"
|
||||||
|
# you can load config file by "env_file"
|
||||||
|
env_file:
|
||||||
|
- "./.env"
|
||||||
|
environment:
|
||||||
|
- ENVIRONMENT=prod
|
||||||
|
- HOST=$HOST
|
||||||
|
- PORT=$PORT
|
||||||
|
- REDIS_HOST=bot_redis
|
||||||
|
- REDIS_PORT=6379
|
||||||
|
networks:
|
||||||
|
- bot_net
|
||||||
|
links:
|
||||||
|
- redis
|
||||||
|
depends_on:
|
||||||
|
- redis
|
||||||
|
restart: always
|
||||||
|
mem_limit: 1024M
|
||||||
|
mem_reservation: 512M
|
||||||
|
networks:
|
||||||
|
bot_net: {}
|
||||||
|
volumes:
|
||||||
|
bot_redis_data: {}
|
834
poetry.lock
generated
834
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "qq-github-bot"
|
name = "qq-github-bot"
|
||||||
version = "0.1.5"
|
version = "0.2.0"
|
||||||
description = "GitHub Bot for QQ"
|
description = "GitHub Bot for QQ"
|
||||||
authors = ["yanyongyu <yanyongyu_1@126.com>"]
|
authors = ["yanyongyu <yanyongyu_1@126.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
@ -8,24 +8,23 @@ license = "MIT"
|
|||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.8"
|
python = "^3.8"
|
||||||
psutil = "^5.7.2"
|
psutil = "^5.7.2"
|
||||||
httpx = "^0.19.0"
|
httpx = "^0.21.0"
|
||||||
Jinja2 = "^3.0.0"
|
Jinja2 = "^3.0.0"
|
||||||
unidiff = "^0.6.0"
|
unidiff = "^0.7.0"
|
||||||
humanize = "^3.5.0"
|
humanize = "^3.5.0"
|
||||||
pydantic = "^1.8.1"
|
pydantic = "^1.9.0"
|
||||||
Markdown = "^3.3.4"
|
Markdown = "^3.3.4"
|
||||||
sentry-sdk = "^1.0.0"
|
sentry-sdk = "^1.0.0"
|
||||||
playwright = "^1.9.2"
|
playwright = "^1.17.2"
|
||||||
typing-extensions = "^3.7.4"
|
typing-extensions = "^4.0.0"
|
||||||
nonebot2 = "^2.0.0-alpha.15"
|
nonebot2 = "^2.0.0-beta.1"
|
||||||
nonebot-adapter-cqhttp = "^2.0.0-alpha.15"
|
nonebot-adapter-onebot = "^2.0.0-beta.1"
|
||||||
redis = {version = "^3.5.3", extras = ["hiredis"]}
|
redis = {version = "^4.0.0", extras = ["hiredis"]}
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
isort = "^5.9.3"
|
isort = "^5.9.3"
|
||||||
black = "^21.8b0"
|
black = "^21.8b0"
|
||||||
nb-cli = "^0.5.0"
|
nb-cli = "^0.6.0"
|
||||||
# nonebot-plugin-test = "^0.2.0"
|
|
||||||
|
|
||||||
# [[tool.poetry.source]]
|
# [[tool.poetry.source]]
|
||||||
# name = "aliyun"
|
# name = "aliyun"
|
||||||
|
Loading…
Reference in New Issue
Block a user