gitea_push2qq/README.md
2023-12-21 22:26:48 +08:00

37 lines
1013 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

启动前自行准备config.toml文件
开发使用这个启动
```shell
python server.py
```
生产环境
```shell
sanic server:app --host=0.0.0.0 --port=80
```
关于各配置文件的介绍:
```toml
# config.toml
private_key = "*******" # ica QQ的私钥
host = "https://example.com:8080" # 服务端的地址
self_id = 123456 # QQ Bot 的id
admin = [1234567, 654321] # 具有管理员权限的QQ号
gitea_host = "http://example.com:3000" # gitea服务端的网址
# 接下来的配置需要先去gitea管理界面添加应用。
# 在其中的回调地址输入https://{本机地址}/redirect
localhost = 'https://example.com' # 本机地址
client_id = '*****-***-*****-*****-****' # gitea分配的客户端id
client_secret = '********' # gitea分配的安全识别码
db_url = 'sqlite://db.sqlite3' # 数据库地址乌龟ORM支持啥这里就支持啥
```
casbin.confcasbin的策略配置文件具体到casbin官网学习
https://casbin.org/zh/
添加指令请在cmds里面添加