Skip to content

把yapi容器化,使其可以在docker中运行

License

Notifications You must be signed in to change notification settings

Git4Mark/yapi-docker-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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 退出容器即可

About

把yapi容器化,使其可以在docker中运行

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published