docker-compose 安装 yapi
docker-compose.yaml
version: '3'
services:
yapi-web:
image: liuqingzheng/yapi:latest
container_name: yapi-web
ports:
- 3000:3000
environment:
- [email protected]
- YAPI_ADMIN_PASSWORD=admin123
- YAPI_CLOSE_REGISTER=true
- YAPI_DB_SERVERNAME=yapi-mongo
- YAPI_DB_PORT=27017
- YAPI_DB_DATABASE=yapi
- YAPI_MAIL_ENABLE=false
- YAPI_LDAP_LOGIN_ENABLE=false
- YAPI_PLUGINS=[]
depends_on:
- yapi-mongo
links:
- yapi-mongo
restart: unless-stopped
yapi-mongo:
image: mongo:latest
container_name: yapi-mongo
volumes:
- ./data/db:/data/db
expose:
- 27017
restart: unless-stopped
常用命令
## 安装目录 /opt/yapi
docker-compose up -d # 启动
docker-compose stop # 停止
docker-compose rm # 删除
管理员添加用户
创建空间 添加成员 协同办公
标签:compose,mongo,YAPI,yapi,DB,docker From: https://www.cnblogs.com/lyc88/p/18224854