Mock数据
2020-01-20 本文已影响0人
老奶瓶
Mock平台DOClever
- 配置文件
version: "2"
services:
DOClever:
image: lw96/doclever
restart: always
container_name: "DOClever"
ports:
- 10000:10000 //第一个端口可以改本地
volumes:
- /本地路径/file:/root/DOClever/data/file
- /本地路径/img:/root/DOClever/data/img
- /本地路径/tmp:/root/DOClever/data/tmp
environment:
- DB_HOST=mongodb://mongo:27017/DOClever
- PORT=10000
links:
- mongo:mongo
mongo:
image: mongo:latest
restart: always
container_name: "mongodb"
volumes:
- /my/own/datadir:/data/db
my/own/datadir可以切成本地地址
- 用docker-compose 启动
cd /home/
mkdir doclever
cd doclever/
vi docker-compose.yml
docker-compose build
docker-compose up -d
查看运行的镜像
docker ps |grep doclever
- 查看防火墙
firewall-cmd --list-state
firewall-cmd --list-all
防火墙放行:
image.png配置文件地址
/home/doclever