「DOClever」- 接口管理平台

  CREATED BY JENKINSBOT

相关链接

项目地址:GitHub/sx1989827/DOClever
使用镜像:GitHub/sx1989827/DOClever/docker

方法一、使用 Docker Compose 运行

1)定义 docker-compose.yaml 文件;

version: "2"
services:
  DOClever:
    image: lw96/doclever
    restart: always
    container_name: "DOClever"
    ports:
    - 10000:10000
    volumes:
    - /srv/doclever/file:/root/DOClever/data/file
    - /srv/doclever/img:/root/DOClever/data/img
    - /srv/doclever/tmp:/root/DOClever/data/tmp
    environment:
    - DB_HOST=mongodb://mongo:27017/DOClever
    - PORT=10000
    links:
    - mongo:mongo

  mongo:
    image: mongo:latest
    restart: always
    container_name: "mongodb"
    volumes:
    - /srv/doclever/own/datadir:/data/db

2)启动容器:docker-compose up -d

3)配置 Nginx 反向代理(nginx.conf);

server {

    server_name doclever.example.com;
    listen 80;

    # http://doclever.cn/controller/read/read.html#5a532f98b7731a2ba86093b3
    underscores_in_headers on;

    rewrite /html/web/controller/index/index.html /html/web/controller/login/login.html redirect;

    location / {
        proxy_pass http://127.0.0.1:10000;
    }

}

参考文献

DOClever使用帮助