Docker for YApi--一键部署YApi
2021-01-14 14:11
标签:ports rest http tmp pos build 用户名 col ash 获取YApi镜像 注意:本仓库目前只支持安装,暂不支持升级,请知晓。如需升级请备份mongoDB内的数据。 docker-compose 部署 启动docker-compose 查看日志 重启mongo/yapi 默认用户名/密码:me@jinfeijie.cn/ymfe.org,安装成功后进入后台修改 yapi github Docker for YApi--一键部署YApi 标签:ports rest http tmp pos build 用户名 col ash 原文地址:https://www.cnblogs.com/linjiqin/p/12260699.html
$ docker pull mrjin/yapi:latestversion: ‘2.1‘
services:
yapi:
image: mrjin/yapi:latest
# build: ./
container_name: yapi
environment:
- VERSION=1.5.6
- LOG_PATH=/tmp/yapi.log
- HOME=/home
- PORT=3000
- ADMIN_EMAIL=admin@yapi.cn
- DB_SERVER=mongo
- DB_NAME=yapi
- DB_PORT=27017
restart: always
ports:
- 3000:3000
volumes:
- /data/yapi/log/yapi.log:/home/vendors/log # log dir
depends_on:
- mongo
entrypoint: "bash /wait-for-it.sh mongo:27017 -- entrypoint.sh"
mongo:
image: mongo
container_name: mongo
restart: always
ports:
- 27017:27017
volumes:
- /data/yapi/mongodb:/data/db #db dir
$ docker-compose up
$ docker-compose up -d
$ docker ps
$ docker logs -f --tail=1000 mongo
$ docker logs -f --tail=1000 yapi
$ docker restart mongo
$ docker restart yapi
https://github.com/jinfeijie/yapi
文章标题:Docker for YApi--一键部署YApi
文章链接:http://soscw.com/index.php/essay/41806.html