version: "3"

services:
  litecoind:
    restart: unless-stopped
    container_name: btcpayserver_litecoind
    image: btcpayserver/litecoin:0.21.2.1-2
    environment:
      BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
      BITCOIN_WALLETDIR: "/walletdata"
      BITCOIN_EXTRA_ARGS: |
        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:
      - "litecoin_datadir:/data"
      - "litecoin_wallet_datadir:/walletdata"
  nbxplorer:
    environment:
      NBXPLORER_CHAINS: "ltc"
      NBXPLORER_LTCRPCURL: http://litecoind:43782/
      NBXPLORER_LTCNODEENDPOINT: litecoind:39388
    volumes:
      - "litecoin_datadir:/root/.litecoin"
  btcpayserver:
    environment:
      BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/
      BTCPAY_CHAINS: "ltc"

volumes:
  litecoin_datadir:
  litecoin_wallet_datadir: