搭建yapi接口管理平台

2019-12-10  本文已影响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
上一篇下一篇

猜你喜欢

热点阅读