Build Status
Build status

MinDoc is a simple and easy-to-use document management system developed for IT teams.

The predecessor of MinDoc was the SmartWiki documentation system. SmartWiki is a document management system developed based on the PHP framework laravel. Because the deployment of PHP is too complicated for ordinary users, Golang is used instead. It is convenient for users to deploy and practical.

The development origin is that the company IT department needs a simple and practical project interface document management and sharing system. Its functionality and interface are derived from kancloud.

It can be used to store daily interface documents, database dictionaries, manual descriptions and other documents. Built-in project management, user management, permission management and other functions can meet the document management needs of most small and medium teams.

Demo Site & Documentation:


Development & maintenance & usage knowledge

Thanks to the author lifei6671 for creating MinDoc and maintaining it for a long time.

Due to work and other reasons, the author has limited energy and cannot spend enough time to maintain mindoc continuously. On March 23, 2021, Beijing time, mindoc was handed over to the community (github organization mindoc-org) for maintenance. We look forward to enthusiastic developers to join mindoc- org to maintain MinDoc together.

If you have any questions, please raise Issues. Users and contributors are welcome to join the QQ group. 1051164153
MinDoc usage & development exchange group

If you are interested in development, please follow Development:


If the golang program is not installed on your server, please manually set an environment variable as follows: the key name is ZONEINFO, the value is MinDoc and /lib/time/zoneinfo.zip in the directory.

See the manual for more information: MinDoc User Manual

For users without Golang experience, you can download the compiled program from https://github.com/mindoc-org/mindoc/releases.

If you have Golang development experience, it is recommended to compile and install, and the golang version is required to be no less than 1.15.1 (requires supportCGO,go modandimport _ "time/tzdata") (recommended Go version is 1.18.1).

Note: The version of GLibC on CentOS7 is low, and the regular compiled version cannot be used. You need to compile your own source code, or use the compiled version using musl.

regular compilation

# 克隆源码
git clone https://github.com/mindoc-org/mindoc.git
# go包安装
go mod tidy -v
# 编译(sqlite需要CGO支持)
go build -ldflags "-w" -o mindoc main.go
# 数据库初始化(此步骤执行之前,需配置`conf/app.conf`)
./mindoc install
# 执行
./mindoc
# 开发阶段运行
bee run

MinDoc If using MySQL to store data, the encoding must beutf8mb4_general_ci.Please fill in the database configuration to the project directory before installation conf/app.conf middle.

If using SQLite database, you can directly configure the database path in the configuration file.

If the conf directory does not exist app.conf please rename app.conf.example for app.conf.

The default program will automatically initialize a super administrator user: admin password: 123456. Please reset your password after logging in.

The compiling method that does not depend on gLibC in Linux system

install musl-gcc

wget -c http://www.musl-libc.org/releases/musl-1.2.2.tar.gz
tar -xvf musl-1.2.2.tar.gz
cd musl-1.2.2
./configure
make
sudo make install

Compile minddoc with musl-gcc

go mod tidy -v
export GOARCH=amd64
export GOOS=linux
# 设置使用musl-gcc
export CC=/usr/local/musl/bin/musl-gcc
# 设置版本
export TRAVIS_TAG=temp-musl-v`date +%y%m%d`
go build -v -o mindoc_linux_musl_amd64 -ldflags="-linkmode external -extldflags '-static' -w -X 'github.com/mindoc-org/mindoc/conf.VERSION=$TRAVIS_TAG' -X 'github.com/mindoc-org/mindoc/conf.BUILD_TIME=`date`' -X 'github.com/mindoc-org/mindoc/conf.GO_VERSION=`go version`'"
# 验证
./mindoc_linux_musl_amd64 version
#邮件配置-示例
#是否启用邮件
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

If you are a Docker user, you can refer to the built-in Dockerfile of the project to compile the image yourself (see the comments at the bottom of the Dockerfile for the compilation command, for reference only).

The following common environment variables need to be provided when starting the image (for all supported environment variables, please refer to: conf/app.conf.example):

DB_ADAPTER                  指定DB类型(默认为sqlite)
MYSQL_PORT_3306_TCP_ADDR    MySQL地址
MYSQL_PORT_3306_TCP_PORT    MySQL端口号
MYSQL_INSTANCE_NAME         MySQL数据库名称
MYSQL_USERNAME              MySQL账号
MYSQL_PASSWORD              MySQL密码
HTTP_PORT                   程序监听的端口号
MINDOC_ENABLE_EXPORT        开启导出(默认为false)

Take a chestnut – current (public) image (information page: https://cr.console.aliyun.com/images/cn-hangzhou/mindoc-org/mindoc/detail , you need to log in to your Alibaba Cloud account to access the list)

Windows

set MINDOC=//d/mindoc
docker run -it --name=mindoc --restart=always -v "%MINDOC%/conf":"/mindoc/conf" -p 8181:8181 -e MINDOC_ENABLE_EXPORT=true -d registry.cn-hangzhou.aliyuncs.com/mindoc-org/mindoc:v2.1

Linux, Mac

export MINDOC=/home/ubuntu/mindoc-docker
docker run -it --name=mindoc --restart=always -v "${MINDOC}/conf":"/mindoc/conf" -p 8181:8181 -e MINDOC_ENABLE_EXPORT=true -d registry.cn-hangzhou.aliyuncs.com/mindoc-org/mindoc:v2.1

Give a chestnut – more examples of environment variables (the mirror has expired, for reference only, please refer to the current mirror)

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

dockerfile content reference

docker-compose one-click installation

  1. Modify configuration file modificationdocker-compose.ymlThe configuration information in the main modificationvolumesnode, which maps the two directories of the host into the container.
    environmentNode, configure your own environment variables.

  2. One-click to complete all environment construction

    docker-compose up -d

  3. browser access

    http://localhost:8181/

    The entire deployment is complete

  4. Common Command Reference

Create project

Create project

project list

project list

Project Overview

Project Overview

project member

project member

Project settings

Project settings

Markdown editor based on Editor.md

Markdown editor based on Editor.md

A rich text editor based on wangEditor

A rich text editor based on wangEditor

Project preview

Project preview

super administrator background

super administrator background

  • Project management, where editorial changes can be made to projects, member additions, etc.
  • Document management, adding and deleting documents, etc.
  • Comment management, you can manage document comments and comments posted by yourself.
  • User management, adding and disabling users, profile changes, etc.
  • User rights management to realize the change of user roles.
  • The project is encrypted, the public status of the project can be set, and the private project needs to be accessed through Token.
  • Site configuration, you can enable anonymous access, verification code, etc.

We welcome you to report issues or pull requests on the MinDoc project’s GitHub.

If you are not familiar with GitHub’s Fork and Pull development mode, you can read GitHub’s documentation (https://help.github.com/articles/using-pull-requests) for more information.

An impure PHPer, an impure gopher.

#mindoc #interface #online #document #management #system #based #beego #framework #implemented #Golang #httpsgithubcommindocorgmindoc #code #cloud #backup #read

Leave a Comment

Your email address will not be published. Required fields are marked *