version: "3"

services:
  bdledger:
    image: bdware/bdledger:dev-210909.874f034d
    command: "-c /etc/bdledger/config.yml"
    restart: unless-stopped
    volumes:
      - ./bdledger/config.yml:/etc/bdledger/config.yml:ro
      - ./bdledger/data:/data
    ports:
      - "2416:2416" # P2P
      - "2401:2401" # API
  bdcontract:
    image: bdware/bdcontract:1.8.2
    command: "-Dfile.encoding=UTF-8 -Djava.library.path='./dynamicLibrary' -Dlog4j.configurationFile=./log4j2.properties -cp ./libs/*:bdagent.jar org.bdware.server.CMHttpServer"
    restart: unless-stopped
    depends_on:
      - bdledger
    volumes:
      - ./bdcontract/rocksdb:/bdcontract/rocksdb
      - ./bdcontract/ContractDB:/bdcontract/ContractDB
      - ./bdcontract/ContractManagerDB:/bdcontract/ContractManagerDB
      - ./bdcontract/BDWareProjectDir:/bdcontract/BDWareProjectDir
      - ./bdcontract/cmconfig.json:/bdcontract/cmconfig.json:ro
#      - ./bdcontract/cp:/bdcontract/cp
      - ./bdcontract/tls:/bdcontract/tls:ro
      - ./bdcontract/manager.key:/bdcontract/manager.key:ro
    ports:
      - "21030:21030" # Contract manager API
      - "21031:21031" # Contract manager master
      - "21032:21032" # DOA
      - "21033:21033" # Prometheus exporter
      - "21050-21100:21050-21100"
