美文网首页
搭建yapi接口管理平台

搭建yapi接口管理平台

作者: 无处安放的躁动 | 来源:发表于2019-12-10 09:27 被阅读0次

    前言

    搭建yapi

    创建docker 网络

    docker network create back-net
    

    docker-compose 文件

    version: '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=james@james.com
          - DB_SERVER=mongo
          - DB_NAME=yapi
          - DB_PORT=27017
        restart: always
        ports:
          - 0.0.0.0: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"
        networks:
          - back-net
      mongo:
        image: mongo
        container_name: mongo
        # restart: always
        ports:
          - 127.0.0.1:27017:27017
        volumes:
          - ~/data/yapi/mongodb:/data/db #db dir
        networks:
          - back-net
    networks:
      back-net:
        external: true
    

    相关文章

      网友评论

          本文标题:搭建yapi接口管理平台

          本文链接:https://www.haomeiwen.com/subject/bfuwgctx.html