version: "3"

services:
  elementsd_liquid:
    restart: unless-stopped
    container_name: btcpayserver_elementsd_liquid
    image: btcpayserver/elements:0.21.0.2-1
    environment:
      ELEMENTS_NETWORK: ${NBITCOIN_NETWORK:-regtest}
      ELEMENTS_MAINNET_CHAIN: "liquidv1"
      ELEMENTS_WALLETDIR: "/walletdata"
      ELEMENTS_EXTRA_ARGS: |
        rpcport=43782
        rpcbind=0.0.0.0:43782
        rpcauth=liquid:c8bf1a8961d97f224cb21224aaa8235d$$402f4a8907683d057b8c58a42940b6e54d1638322a42986ae28ebb844e603ae6
        port=39388
        whitelist=0.0.0.0/0
        validatepegin=0
        fallbackfee=0.000001
        rpcallowip=0.0.0.0/0        
    expose:
      - "43782"
      - "39388"
    volumes:
      - "elements_datadir:/data"
      - "elements_wallet_datadir:/walletdata"
  nbxplorer:
    environment:
      NBXPLORER_CHAINS: "lbtc"
      NBXPLORER_LBTCRPCURL: http://elementsd_liquid:43782/
      NBXPLORER_LBTCNODEENDPOINT: elementsd_liquid:39388
      NBXPLORER_LBTCRPCUSER: "liquid"
      NBXPLORER_LBTCRPCPASSWORD: "liquid"
    volumes:
      - "elements_datadir:/root/.elements"
  btcpayserver:
    environment:
      BTCPAY_CHAINS: "lbtc"
      BTCPAY_LBTCEXPLORERURL: http://nbxplorer:32838/
volumes:
  elements_datadir:
  elements_wallet_datadir:

recommended:
  - "liquid-default-prune"
