Ryan-Miao / docker-yapi

Docker build and run yapi as service
288 stars 115 forks source link

部署yapi v1.7.0,Nginx配置后,仍有问题. #2

Closed lhalcyon closed 5 years ago

lhalcyon commented 5 years ago

如题,查看日志 报

error: MongoError: Authentication failed., mongodb Authentication failed
log: mongodb load success...
(node:6) UnhandledPromiseRejectionWarning: Error: Cannot read property 'collection' of undefined
    at /api/vendors/server/install.js:151:13
    at processTicksAndRejections (internal/process/task_queues.js:86:5)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
zsmhub commented 5 years ago

我删除了mongodb的auth认证,直接免密访问数据库就能配置成功了。 操作方法如下:

  1. 删除start.sh里的start-mongo函数的--auth
  2. 删除config.json中: "user": "yapi", "pass": "yapi123456", "authSource":"admin"
lhalcyon commented 5 years ago

后面我遇到的是另外的问题.去除或者使用nginx反向代理, 登录都504或502 ,但是status接口是通的. 后面我改用官网推荐的第一篇docker安装的就好了,第二篇步骤详细,但是部署后还是有些问题