https://dev.aliyun.com/list.html?namePrefix=tandaly/yapi
version: "2"
services:
mongo:
image: mongo:3
container_name: mongo
privileged: true
restart: always
networks:
- yapi
environment:
- MONGO_INITDB_ROOT_USERNAME=yapi
- MONGO_INITDB_ROOT_PASSWORD=yapi
- MONGO_INITDB_DATABASE=yapi
volumes:
- ./mongo-data:/data/db
yapi:
image: registry.cn-hangzhou.aliyuncs.com/tandaly/yapi
container_name: yapi
privileged: true
restart: always
depends_on:
- mongo
ports:
- "8000:3000"
networks:
- yapi
volumes:
- ./config.json:/app/config.json
- ./yapi-runtime:/app/runtime
networks:
yapi:
{
"port": "3000",
"adminAccount": "[email protected]",
"db": {
"servername": "mongo",
"DATABASE": "yapi",
"port": 27017,
"user": "yapi",
"pass": "yapi",
"authSource": "admin"
}
}
docker-compose up -d
docker-compose down
访问地址:http://主机IP:8000
密码: ymfe.org