Code Monkey home page Code Monkey logo

yapi-docker-1's Introduction

yapi-docker

把Yapi容器化,使其可以在docker中运行,Yapi项目地址https://github.com/YMFE/yapi

编译

  1. 首先把这个库克隆到本地

git clone https://github.com/silsuer/yapi-docker.git

  1. 准备编译

docker build yapi-docker/. -t silsuer/yapi

(silsuer/yapi是自定义的镜像名)

  1. 编译成功

从DockerHub进行安装

docker pull silsuer/yapi

运行

  1. 运行镜像

docker run -dit -p 27017:27017 -p 9090:9090 -p 3000:3000 silsuer/yapi

  1. 进入容器

 - 查看容器id

`docker ps`

 - 进入容器

`docker attach container-id`
  1. 启动mongodb

service mongodb start

  1. 启动yapi安装程序

yapi server

  1. 根据提示在浏览器中输入ip:9090进行安装,管理员账号默认账号名:"[email protected]",密码:"ymfe.org"

  2. 回到终端,执行nohup node /my-yapi/vendors/server/app.js 2>&1 & 在后台运行yapi

  3. 执行ctrl+p+ctrl+q 退出容器即可

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.