Loading... ## 编写codker-compose.yml文件 ```yaml version: '3' services: yapi-web: image: jayfong/yapi:latest container_name: yapi-web ports: - 3000:3000 environment: - YAPI_ADMIN_ACCOUNT=admin@admin.cn - YAPI_ADMIN_PASSWORD=password - 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 ``` ## 启动Yapi ```shell docker-compose -f docker-compose.yml up -d ``` 最后修改:2021 年 11 月 15 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 0 如果觉得我的文章对你有用,请随意赞赏