Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加清理附件按钮,对悬空无引用的图片/附件进行清理 #918

Merged
merged 4 commits into from
Dec 19, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add readme
  • Loading branch information
ywz978020607 committed Dec 18, 2023
commit 687aacd28cf175a17fd2b92c7d19a8b9f03ae751
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,52 @@ docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP
- (需重新编译项)为了对已删除文档/文档引用图片删除文字后,对悬空无引用的图片/附件进行清理,增加了清理接口,需重新编译
- 编译后除二进制文件外还需更新三个文件: conf/lang/en-us.ini,zh-cn.ini; attach_list.tpl
- 若不想重新编译,也可通过database/clean.py,手动执行对无引用图片/附件的文件清理和数据库记录双向清理。
- 若采用nginx二级部署,以yourpath/为例,需修改
- conf/app.conf修改:`baseurl="/yourpath"`
- static/js/kancloud.js文件中`url: "/comment/xxxxx` => `url: "/yourpath" + "/comment/xxxxx`, 共两处

- nginx端口代理示例:
```
增加
location /yourpath/ {
rewrite ^/yourpath/(.*) /$1 break;
proxy_pass http://127.0.0.1:8181;
}
```
注意使用的是127.0.0.1,根据自身选择替换,如果nginx是docker部署,则还需要在docker中托管运行mindoc,具体参考如下配置:
- docker-compose代理示例(docker-nginx代理运行mindoc)
```
version: '3'
services:
mynginx:
image: nginx:latest
ports:
- "8880:80"
command:
- bash
- -c
- |
service nginx start
cd /src/mindoc/ && ./mindoc
volumes:
- ..:/src
- ./nginx:/etc/nginx/conf.d
```

目录结构
```
onefolder
|
- docker
|
- docker-compose.yml
- nginx
|
- mynginx.conf

- mindoc
|
- database/
- conf/
- ...
```