更新文档
This commit is contained in:
parent
812b8ce8e3
commit
7352c847b8
|
@ -41,6 +41,7 @@ type Config struct {
|
|||
Password string `json:"password" yaml:"password"`
|
||||
Host string `json:"host" yaml:"host"`
|
||||
Port int `json:"port" yaml:"port"`
|
||||
Announcement string `json:"announcement" yaml:"announcement"`
|
||||
} `json:"web"`
|
||||
Cron string `json:"cron" yaml:"cron"`
|
||||
EdgePath string `json:"edge_path" yaml:"edge_path"`
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
## 配置文件<!-- {docsify-ignore} -->
|
||||
|
||||
> 配置文件修改后需要重启程序才能生效
|
||||
|
||||
```yaml
|
||||
# 刷课模式,默认为3,
|
||||
# 1:只刷文章何视频
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Docsify-Guide</title>
|
||||
<title>Study_xxqg</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport"
|
||||
|
|
|
@ -11,8 +11,14 @@
|
|||
## docker运行
|
||||
|
||||
```
|
||||
docker run --name study_xxqg -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ jolanse/study_xxqg
|
||||
docker run --name study_xxqg -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ jolanse/study_xxqg:latest
|
||||
```
|
||||
各个参数的含义:
|
||||
|
||||
+ **--name study_xxqg** 运行的容器的名称,可以根据自己实际情况进行修改
|
||||
+ **-p 8080:8080** 将容器内部的8080端口映射到容器外面,前面是宿主机的端口,就是网页上访问的端口,后面是容器内部需要运行的端口,对应配置文件内web配置的端口就好
|
||||
+ **-v /etc/study_xxqg/:/opt/config/** 将容器内的/opt/config/目录映射到宿主机的/etc/study_xxqg/目录,可根据实际情况修改前面宿主机路径,映射后对应的config.yml配置文件位置就在该目录下
|
||||
+ **jolanse/study_xxqg:latest**镜像名称和镜像的版本,latest代表开发中的最新版本
|
||||
|
||||
## docker-compose运行
|
||||
|
||||
|
|
|
@ -87,8 +87,9 @@ study_xxqg进程会在运行的时候将pid输出到目录下的pid.pid文件,
|
|||
|
||||
使用docker可以快速解决
|
||||
|
||||
[//]: # (```)
|
||||
|
||||
[//]: # (sudo apt-get install -y libx11-xcb1 && apt-get install -y libgtk-3-0 && apt-get install -y libxt6 && apt-get install -y libdbus-glib-1.2)
|
||||
+ ### 为什么运行了就卡住了
|
||||
|
||||
[//]: # (```)
|
||||
当开启了cron定时配置,微信公众号测试号配置,telegram配置这三项的任意一项后,
|
||||
|
||||
程序就会等待用户的指令从而卡住,所以只需要修改配置文件就可以解决
|
17
docs/push.md
17
docs/push.md
|
@ -37,10 +37,12 @@ wechat:
|
|||
```
|
||||
|
||||
+ 前往微信[公众号开发者平台](http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login),手机微信扫码登录
|
||||
+ 配置url为**http:ip:port/wx**,ip和端口在web项配置中配置
|
||||
+ 设置token
|
||||
+ 分别添加登录模板消息和普通模板消息,添加要求查看配置项注释
|
||||
+ 配置url为**http://ip:port/wx**,ip为你运行机器的公网ip,若使用docker运行,端口则为宿主机中映射出来的端口,ip和端口的配置和web使用同一个配置
|
||||
+ 设置token,需和配置项中一样
|
||||
+ 分别添加登录模板消息和普通模板消息,添加要求:
|
||||
+ 在配置文件中配置所有内容,启动程序
|
||||
+ 运行程序后,在浏览器中访问配置的url,页面会返回``No Signature!``,然后提交配置,若成功则关注公众号尝试运行
|
||||
+ docker运行方式参考[linux运行](./linux/index.md)
|
||||
|
||||
### web推送
|
||||
> 适用于部署在服务器上或者家里有公网IP的设备上
|
||||
|
@ -60,7 +62,9 @@ web:
|
|||
password: admin
|
||||
```
|
||||
|
||||
开启后通过浏览器访问 *http://ip:port*即可打开网址
|
||||
+ 开启后通过浏览器访问 *http://ip:port*即可打开网址 ,若为docker运行,则ip为宿主机公网ip,端口为docker映射到宿主机的端口
|
||||
+ 若无法访问,首先检查程序运行日志,查看有无报错,其次查看docker的运行情况,端口是否映射正常,然后可以通过curl命令检测在宿主机中能否访问,然后检查防火墙之类的
|
||||
+ 若点击登录之后出现一个小框然后无反应,则说明账户密码错误,请重新配置程序账户密码并重启程序
|
||||
|
||||
### 钉钉推送
|
||||
配置config.yml的如下部分,具体使用教程详情参考[钉钉](https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f875e5903iVpC#topic-2026027)
|
||||
|
@ -70,6 +74,11 @@ ding:
|
|||
access_token: ""
|
||||
secret: ""
|
||||
```
|
||||
+ 在电脑端钉钉中创建群聊,在聊天设置中选择只能群助手,选择添加机器人,机器人类别选择webhook自定义机器人
|
||||
+ 机器人名字任意,机器人安全设置勾选加签,复制加签的密钥,作为secret配置项填入配置文件中
|
||||
+ 勾选协议,确认添加,会出现一个webhook地址,形如这样:```https://oapi.dingtalk.com/robot/send?access_token=aaabbbbcccc```
|
||||
+ 将上述地址中的后半段,就是access_token=之后的内容作为access_token配置项填入配置文件中,例如上述网址,则填入aaabbbccc到access_token中
|
||||
+ 设置定时cron,启动程序,程序会在定时时间运行脚本
|
||||
|
||||
### pushplus推送
|
||||
配置config.yml的如下部分,具体使用教程参考[pushplus](https://www.pushplus.plus/)
|
||||
|
|
Loading…
Reference in New Issue