version: "3"

services:
  monacoind:
    restart: unless-stopped
    container_name: btcpayserver_monacoind
    image: wakiyamap/docker-monacoin:0.20.2
    environment:
      BITCOIN_EXTRA_ARGS: |
        ${NBITCOIN_NETWORK:-regtest}=1
        rpcport=43782
        rpcbind=0.0.0.0:43782
        rpcallowip=0.0.0.0/0
        port=39388
        whitelist=0.0.0.0/0
    expose:
      - "43782"
      - "39388"
    volumes:
      - "monacoin_datadir:/data"
  nbxplorer:
    environment:
      NBXPLORER_CHAINS: "mona"
      NBXPLORER_MONARPCURL: http://monacoind:43782/
      NBXPLORER_MONANODEENDPOINT: monacoind:39388
    volumes:
      - "monacoin_datadir:/root/.monacoin"
  btcpayserver:
    environment:
      BTCPAY_MONAEXPLORERURL: http://nbxplorer:32838/
      BTCPAY_CHAINS: "mona"

volumes:
  monacoin_datadir:
