docker-compose部署Yapi的方法

本站所有内容来自互联网收集,仅供学习和交流,请勿用于商业用途。如有侵权、不妥之处,请第一时间联系我们删除!Q群:迪思分享

免费资源网 – https://freexyz.cn/

1 安装docker

sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager –add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo sudo yum install docker-ce systemctl start docker

2 安装docker-compose

curl -L https://get.daocloud.io/docker/compose/releases/download/1.29.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose

3 新建docker-compose.yml

vim docker-compose.yml

version: 3 services: yapi-web: image: liuqingzheng/yapi:latest container_name: yapi-web ports: – 3000:3000 environment: – YAPI_ADMIN_ACCOUNT=123@qq.com – YAPI_ADMIN_PASSWORD=admin – YAPI_CLOSE_REGISTER=true – YAPI_DB_SERVERNAME=yapi-mongo – YAPI_DB_PORT=27017 – YAPI_DB_DATABASE=yapi – YAPI_MAIL_ENABLE=false – YAPI_LDAP_LOGIN_ENABLE=false – YAPI_PLUGINS=[] depends_on: – yapi-mongo links: restart: unless-stopped yapi-mongo: image: mongo:latest container_name: yapi-mongo volumes: – ./data/db:/data/db expose: – 27017

4 启动

docker-compose up -d # 启动 docker-compose stop # 停止 docker-compose rm # 删除

5 访问

http://127.0.0.1:3000/ 输入邮箱:123@qq.com 输入密码:admin

docker-compose部署Yapi的方法插图

免费资源网 – https://freexyz.cn/


© 版权声明
THE END
★喜欢这篇文章吗?喜欢的话,麻烦动动手指支持一下!★
点赞11 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容