version: "3"

services:
  dashd:
    restart: unless-stopped
    container_name: btcpayserver_dashd
    image: btcpayserver/dash:19.2.0
    environment:
      # rpcport and rpcbind seems duplicates, but they are not
      # rpcport is using by some tooling to automatically get
      # the rpcport from the configuration file. Do not remove!
      BITCOIN_EXTRA_ARGS: |
        ${NBITCOIN_NETWORK:-regtest}=1
        port=9999
        rpcport=9998
        rpcbind=0.0.0.0:9998
        rpcallowip=0.0.0.0/0
        whitelist=0.0.0.0/0
    expose:
      - "9998"
      - "9999"
    volumes:
      - "dash_datadir:/data"
  nbxplorer:
    environment:
      NBXPLORER_CHAINS: "dash"
      NBXPLORER_DASHRPCURL: http://dashd:9998/
      NBXPLORER_DASHNODEENDPOINT: dashd:9999
    volumes:
      - "dash_datadir:/root/.dashcore"
  btcpayserver:
    environment:
      BTCPAY_CHAINS: "dash"
      BTCPAY_DASHEXPLORERURL: http://nbxplorer:32838/
volumes:
  dash_datadir:
