-
docker-compose.yml文件
version: '2.1' services: yapi: image: mrjin/yapi:latest # build: ./ container_name: yapi environment: - VERSION=1.9.3 - LOG_PATH=/tmp/yapi.log - HOME=/home - PORT=3008 - ADMIN_EMAIL=xxxxxx@qq.com - DB_SERVER=mongo - DB_NAME=yapi - DB_PORT=27017 # restart: always ports: - 3008:3008 volumes: - ./logs:/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:/data/db #db dir networks: default: external: name: my-docker-compose-network
当前目录创建一个data目录
启动服务
docker-compose up -d
浏览器访问服务
http://ip:por
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)