mindoc/README.md

192 lines
6.5 KiB
Markdown
Raw Normal View History

2017-05-01 21:05:34 +08:00
# MinDoc 简介
2017-06-14 09:40:09 +08:00
[![Build Status](https://travis-ci.org/lifei6671/mindoc.svg?branch=master)](https://travis-ci.org/lifei6671/mindoc)
2017-06-14 09:47:18 +08:00
[![Build status](https://ci.appveyor.com/api/projects/status/ik70whjrioyvfy18/branch/master?svg=true)](https://ci.appveyor.com/project/lifei6671/godoc/branch/master)
2017-06-14 09:53:37 +08:00
2018-06-27 15:10:01 +08:00
MinDoc 是一款针对IT团队开发的简单好用的文档管理系统。
2017-05-01 21:05:34 +08:00
MinDoc 的前身是 SmartWiki 文档系统。SmartWiki 是基于 PHP 框架 laravel 开发的一款文档管理系统。因 PHP 的部署对普通用户来说太复杂,所以改用 Golang 开发。可以方便用户部署和实用。
2018-06-27 15:10:01 +08:00
开发缘起是公司IT部门需要一款简单实用的项目接口文档管理和分享的系统。其功能和界面源于 kancloud 。
2017-05-01 21:05:34 +08:00
可以用来储存日常接口文档,数据库字典,手册说明等文档。内置项目管理,用户管理,权限管理等功能,能够满足大部分中小团队的文档管理需求。
2017-05-20 08:49:44 +08:00
演示站点: [http://doc.iminho.me](http://doc.iminho.me)
2017-05-01 21:05:34 +08:00
# 安装与使用
2017-05-10 10:03:13 +08:00
**如果你的服务器上没有安装golang程序请手动设置一个环境变量如下键名为 ZONEINFO值为MinDoc跟目录下的/lib/time/zoneinfo.zip 。**
2017-05-09 18:22:05 +08:00
2017-06-15 16:34:39 +08:00
更多信息请查看手册: [MinDoc 使用手册](https://github.com/lifei6671/mindoc/wiki)
2017-06-14 09:41:23 +08:00
对于没有Golang使用经验的用户可以从 [https://github.com/lifei6671/mindoc/releases](https://github.com/lifei6671/mindoc/releases) 这里下载编译完的程序。
2017-05-01 21:05:34 +08:00
2018-04-17 13:33:08 +08:00
如果有Golang开发经验建议通过编译安装在此之前您需要先安装Golang官方包管理工具详见[Install dep](https://golang.github.io/dep/docs/installation.html)。
2017-05-01 21:05:34 +08:00
```bash
2017-06-14 09:41:23 +08:00
git clone https://github.com/lifei6671/mindoc.git
2017-05-01 21:05:34 +08:00
2018-04-17 13:33:08 +08:00
dep ensure
2017-05-01 21:05:34 +08:00
go build -ldflags "-w"
2017-06-14 09:41:23 +08:00
./mindoc install
./mindoc
2017-05-01 21:05:34 +08:00
```
MinDoc 使用MySQL储存数据且编码必须是`utf8mb4_general_ci`。请在安装前,把数据库配置填充到项目目录下的 conf/app.conf 中。
如果conf目录下不存在 app.conf 请重命名 app.conf.example 为 app.conf。
2018-06-27 15:10:01 +08:00
2017-07-17 17:24:15 +08:00
**默认程序会自动初始化一个超级管理员用户admin 密码123456 。请登录后重新设置密码。**
2017-05-04 09:39:44 +08:00
```bash
#邮件配置
#是否启用邮件
enable_mail=true
#smtp服务器的账号
smtp_user_name=admin@iminho.me
#smtp服务器的地址
smtp_host=smtp.ym.163.com
#密码
smtp_password=1q2w3e__ABC
#端口号
smtp_port=25
#邮件发送人的地址
form_user_name=admin@iminho.me
#邮件有效期30分钟
mail_expired=30
```
2017-05-01 21:05:34 +08:00
# 使用Docker部署
如果是Docker用户可参考项目内置的Dockerfile文件编译镜像。
在启动镜像时需要提供如下的环境变量:
```ini
2018-06-27 15:15:11 +08:00
DB_ADAPTER 制定 DB
2017-05-01 21:05:34 +08:00
MYSQL_PORT_3306_TCP_ADDR MySQL地址
MYSQL_PORT_3306_TCP_PORT MySQL端口号
MYSQL_INSTANCE_NAME MySQL数据库名称
MYSQL_USERNAME MySQL账号
MYSQL_PASSWORD MySQL密码
HTTP_PORT 程序监听的端口号
```
举个栗子
```bash
2018-06-27 15:10:01 +08:00
docker run -p 8181:8181 --name mindoc -e DB_ADAPTER=mysql -e MYSQL_PORT_3306_TCP_ADDR=10.xxx.xxx.xxx -e MYSQL_PORT_3306_TCP_PORT=3306 -e MYSQL_INSTANCE_NAME=mindoc -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=123456 -e httpport=8181 -d daocloud.io/lifei6671/mindoc:latest
2017-05-01 21:05:34 +08:00
```
### docker-compose 一键安装
2018-08-23 18:41:13 +08:00
1. 修改配置文件
修改`docker-compose.yml`中的配置信息,主要修改`volumes`节点,将宿主机的两个目录映射到容器内。
`environment`节点,配置自己的环境变量。
2. 一键完成所有环境搭建
2018-08-23 18:41:13 +08:00
> docker-compose up -d
3. 浏览器访问
> http://localhost:8181/
2018-06-27 15:10:01 +08:00
整个部署完成了
4. 常用命令参考
- 启动
2018-08-23 18:41:13 +08:00
> docker-compose up -d
- 停止
2018-08-23 18:41:13 +08:00
> docker-compose stop
- 重启
2018-08-23 18:41:13 +08:00
> docker-compose restart
- 停止删除容器,释放所有资源
> docker-compose down
2018-08-23 18:41:13 +08:00
- 删除并重新创建
> docker-compose -f docker-compose.yml down && docker-compose up -d
更多 docker-compose 的使用相关的内容 请查看官网文档或百度
2018-08-08 15:50:55 +08:00
# 支持 MinDoc
2018-08-08 16:24:06 +08:00
![支付宝](https://raw.githubusercontent.com/lifei6671/mindoc/master/static/images/alipay.png) ![微信支付](https://raw.githubusercontent.com/lifei6671/mindoc/master/static/images/weixin.png)
2017-05-01 21:05:34 +08:00
# 项目截图
2017-05-01 21:15:42 +08:00
**创建项目**
2017-06-14 09:41:23 +08:00
![创建项目](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204438.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**项目列表**
2017-06-14 09:41:23 +08:00
![项目列表](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203542.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**项目概述**
2017-06-14 09:41:23 +08:00
![项目概述](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203619.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**项目成员**
2017-06-14 09:41:23 +08:00
![项目成员](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203637.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**项目设置**
2017-06-14 09:41:23 +08:00
![项目设置](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203656.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**基于Editor.md开发的Markdown编辑器**
2017-06-14 09:41:23 +08:00
![基于Editor.md开发的Markdown编辑器](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501203854.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**基于wangEditor开发的富文本编辑器**
2017-06-14 09:41:23 +08:00
![基于wangEditor开发的富文本编辑器](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204651.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**项目预览**
2017-06-14 09:41:23 +08:00
![项目预览](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204609.png)
2017-05-01 21:11:36 +08:00
2017-05-01 21:15:42 +08:00
**超级管理员后台**
2017-06-14 09:41:23 +08:00
![超级管理员后台](https://raw.githubusercontent.com/lifei6671/mindoc/master/uploads/20170501204710.png)
2017-05-01 21:05:34 +08:00
# 使用的技术
2018-10-19 17:26:40 +08:00
- beego 1.10.0
2017-05-01 21:05:34 +08:00
- mysql 5.6
2018-10-19 17:26:40 +08:00
- editor.md Markdown 编辑器
2017-05-01 21:05:34 +08:00
- bootstrap 3.2
- jquery 库
- webuploader 文件上传框架
- Nprogress 库
- jstree 树状结构库
- font awesome 字体库
- cropper 图片剪裁库
- layer 弹出层框架
- highlight 代码高亮库
- to-markdown HTML转Markdown库
2018-10-19 17:26:40 +08:00
- quill 富文本编辑器
- vue 框架
2017-05-01 21:05:34 +08:00
# 主要功能
- 项目管理,可以对项目进行编辑更改,成员添加等。
- 文档管理,添加和删除文档等。
- 评论管理,可以管理文档评论和自己发布的评论。
- 用户管理,添加和禁用用户,个人资料更改等。
- 用户权限管理 实现用户角色的变更。
- 项目加密可以设置项目公开状态私有项目需要通过Token访问。
- 站点配置,可开启匿名访问、验证码等。
# 参与开发
我们欢迎您在 MinDoc 项目的 GitHub 上报告 issue 或者 pull request。
如果您还不熟悉GitHub的Fork and Pull开发模式您可以阅读GitHub的文档https://help.github.com/articles/using-pull-requests 获得更多的信息。
# 关于作者
2017-05-12 10:20:55 +08:00
一个不纯粹的PHPer一个不自由的 gopher 。