version: "3.3"
services:
mongodb:
image: mongo:3.4
container_name: mongodb-easymock
privileged: true
restart: always
ports:
- 27017:27017
volumes:
- type: bind
source: ./data/db # 数据库文件存放地址,根据需要修改为本地地址
target: /data/db
networks:
mynet:
ipv4_address: 172.16.100.2
redis:
image: redis:4.0.6
container_name: mongodb-redis
privileged: true
restart: always
ports:
- 6379:6379
command: redis-server --appendonly yes
volumes:
- type: bind
source: ./data/redis # redis 数据文件存放地址,根据需要修改为本地地址
target: /data
networks:
mynet:
ipv4_address: 172.16.100.3
nginx :
image: nginx:1.15.6
container_name: redis
privileged: true
restart: always
ports:
- 80:80
volumes:
- type: bind
source: /etc/localtime
target: /etc/localtime:ro
- type: bind
source: /docker/share
target: /share
- type: bind
source: /docker/environment/nginx/conf/nginx.conf
target: /etc/nginx/nginx.conf
networks:
mynet:
ipv4_address: 172.16.100.4
web:
image: easymock/easymock:1.6.0
container_name: easymock
privileged: true
restart: always
command: /bin/bash -c "npm start"
links:
- mongodb:mongodb
- redis:redis
ports:
- 7300:7300
volumes:
- type: bind
source: ./logs # 日志地址,根据需要修改为本地地址
target: /home/easy-mock/easy-mock/logs
- type: bind
source: ./production.json # 配置地址,请使用本地配置地址替换
target: /home/easy-mock/easy-mock/config/production.json
networks:
mynet:
ipv4_address: 172.16.100.5
networks:
mynet:
ipam:
config:
- subnet: 172.16.100.0/24 #docker-compose ‘2’之后不予许指定网关,则默认网关为172.16.100.1
相关文章
- 04-05easymock的docker-compose.yml文件配置
- 04-05dhcp 的安装和配置文件
- 04-05django里static配置静态文件的引入
- 04-05django的静态文件配置和路由控制
- 04-05nginx日志文件的配置
- 04-05无法为具有固定名称“System.Data.SqlClient”的 ADO.NET 提供程序加载在应用程序配置文件中注册的实体框架提供程序类型“System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer”。请确保使用限定程序集的名称且该程序集对运行的应用程序可用。有关详细信息,请参阅 http://go.m
- 04-05SSM框架的几个重要配置文件
- 04-05LOG4J的配置文件
- 04-05SqlSessionFaction读取配置文件找不到Resources的getResource的方法
- 04-05Spring的学习1(IOC使用XML配置文件的基本使用)