Giter Site home page Giter Site logo

创建yapi失败 about docker-yapi HOT 19 CLOSED

fjc0k avatar fjc0k commented on July 20, 2024
创建yapi失败

from docker-yapi.

Comments (19)

fjc0k avatar fjc0k commented on July 20, 2024 2

我这儿的问题,等新版本

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024 1

docker-compose 你改了吧,把它发出来

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024
ersion: '3.7'

services:
  yapi-web:
    image: jayfong/yapi:latest
    container_name: yapi-web
    ports:
      - 8082:3000
    environment:
      - [email protected]
      - YAPI_ADMIN_PASSWORD=admin
      - YAPI_CLOSE_REGISTER=true
      - YAPI_DB_SERVERNAME=yapi-mongo
      - YAPI_DB_PORT=27017
      - YAPI_DB_DATABASE=yapi
      - YAPI_DB_USER=mongo
      - YAPI_DB_PASS=admin
      - YAPI_MAIL_ENABLE=false
      - YAPI_LDAP_LOGIN_ENABLE=false
      - YAPI_PLUGINS=[{"name":"add-user"},{"name":"webhook"}]
    volumes:
      - ./data/yapi-vendors:/yapi/vendors
    depends_on:
      - yapi-mongo
    restart: unless-stopped
  yapi-mongo:
    image: mongo:latest
    container_name: yapi-mongo
    volumes:
      - yapi-data:/data/db
    expose:
      - 27017
    restart: unless-stopped

volumes:
    yapi-data:

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

默认 MongoDB 是不用认证的,你把:

      - YAPI_DB_USER=mongo
      - YAPI_DB_PASS=admin

去掉试试。

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

你把认证的去掉试试吧

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

我这儿试了下,貌似是镜像的问题,在第二次启动时会一直处于尝试安装的状态

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

大佬,还是不行

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

使用 docker-compose pull yapi-web 重新拉取镜像,试下最新的

Sent with GitHawk

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

还是卡在了尝试安装yapi

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

1、删掉数据库认证环境变量;
2、在安装目录执行以下命令:

rm -rf ./data \
  && docker-compose pull yapi-web \
  && docker-compose down \
  && docker-compose up -d

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

npm
ERR!
missing script: build-client

npm
ERR! A complete log of this run can be found in:
npm
ERR! /root/.npm/_logs/2019-12-24T01_44_58_494Z-debug.log

尝试安装 YApi...
关闭引导服务...
尝试启动 YApi...
(node:1) UnhandledPromiseRejectionWarning: Error: Cannot find module './vendors/server/app.js'
Require stack:

  • /yapi/start.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:17)
    at Function.Module._load (internal/modules/cjs/loader.js:859:27)
    at Module.require (internal/modules/cjs/loader.js:1028:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at Main.start (/yapi/start.js:323:9)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    (node:1) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
    (node:1) [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.

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

这次报错容器停止了

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

把对 yapi-vendors 的映射删了

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

怎么删?yapi-vendors是什么?

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

这个删了:

    volumes:
      - ./data/yapi-vendors:/yapi/vendors

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

好了,部署完成,如何但是我需要给mongo开启用户认证要怎么操作呢

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

需要我新开个issue吗

from docker-yapi.

fjc0k avatar fjc0k commented on July 20, 2024

根本不需要开启,MongoDB 没有暴露在外的。如果需要开启,请搜索 docker MongoDB 相关

from docker-yapi.

MalavitaC avatar MalavitaC commented on July 20, 2024

好的我先自己试试,我把issue关了

from docker-yapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.