YApi Docker

Docker Compose

yapi.yml

Installation

# 第一次启动使用
command: "yapi server"

Deploy

# 之后使用下面的命令
command: "node /my-yapi/vendors/server/app.js"

Structure

├── mongo
│   ├── data
│   │   └── db
│   └── etc
├── mongo-conf
│   └── init-mongo.js
└── mongo-yapi.yml

# yapi
├── Dockerfile
├── yapi.yml
└── repositories

AD Integration

vi my-yapi/config.json

  "ldapLogin": {
      "enable": true,
      "server": "ldap://192.168.1.10", //AD域控服务器
      "baseDn": "yapi@test.com", //AD域控用对应给与一个认证用户
      "bindPassword": "Test1234", //对应认证用户密码
      "searchDn": "OU=技术中心,DC=test,DC=com", //可读取的OU路径
      "searchStandard": "&(objectCategory=Person)(sAMAccountName=%s)", //MS AD的用户属性
      "emailPostfix": "", //非必须可为空
      "emailKey": "", //非必须可为空
      "usernameKey": "sAMAccountName" 用户登录密码取值为对应用户属性,原因为AD密码不可逆,只取此值
  }