version: "3"

services:
  clightning_litecoin:
    image: btcpayserver/lightning:v0.9.0-1
    container_name: btcpayserver_clightning_litecoin
    restart: unless-stopped
    environment:
      LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
      LIGHTNINGD_CHAIN: ltc
      LIGHTNINGD_ALIAS: ${LIGHTNING_ALIAS}
      LIGHTNINGD_ANNOUNCEADDR: ${BTCPAY_ANNOUNCEABLE_HOST}
      LIGHTNINGD_PORT: 9735
      LIGHTNINGD_READY_FILE: /root/.nbxplorer/ltc_fully_synched
      LIGHTNINGD_OPT: |
        bitcoin-datadir=/etc/litecoin
        bitcoin-rpcconnect=litecoind
    volumes:
      - "clightning_litecoin_datadir:/root/.lightning"
      - "litecoin_datadir:/etc/litecoin"
      - "nbxplorer_datadir:/root/.nbxplorer"
    ports:
      - "9736:9735"
    links:
      - litecoind
  btcpayserver:
    environment:
      BTCPAY_LTCLIGHTNING: "type=clightning;server=unix://etc/clightning_litecoin/lightning-rpc"
    volumes:
      - "clightning_litecoin_datadir:/etc/clightning_litecoin"
    links:
      - clightning_litecoin
volumes:
  clightning_litecoin_datadir:
