easymock的docker-compose.yml文件配置

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

上一篇:java – EasyMock方法参数中的长null匹配


下一篇:java – EasyMock.anyObject()是否匹配null参数?