version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: core-lightning-rtl_web_1
      APP_PORT: 3000

  web:
    image: shahanafarooqui/rtl:v0.15.8@sha256:54131152cba02a968d83fcc89c07426bfb979372f743649ba1e2626426a34dc0
    restart: on-failure
    environment:
      PORT: 3000
      APP_PASSWORD: $APP_PASSWORD
      LN_IMPLEMENTATION: "CLN"
      lnImplementation: "CLN"
      LN_SERVER_URL: "https://$APP_CORE_LIGHTNING_DAEMON_IP:$CORE_LIGHTNING_REST_PORT"
      RUNE_PATH: "/root/.lightning/.commando-env"
      RTL_CONFIG_PATH: "/data"
      RTL_COOKIE_PATH: "/data/.cookie"
      BLOCK_EXPLORER_URL: "${APP_CORE_RTL_BLOCK_EXPLORER_URL}"
      # Больц
      BOLTZ_SERVER_URL: "https://core-lightning-rtl_boltz_1:9003"
      BOLTZ_MACAROON_PATH: "/boltz/.boltz/macaroons"
    volumes:
      - "${APP_DATA_DIR}/data/rtl:/data"
      - "${APP_CORE_LIGHTNING_DATA_DIR}:/root/.lightning:ro"
      - "${APP_DATA_DIR}/data/boltz:/boltz:ro"

  boltz:
    image: boltz/boltz-client:2.11.1@sha256:25a984cc76b0d232573cffe7088c2cb2e50b6b8955e09f68d768ef5fc7215c1d
    restart: "on-failure"
    stop_grace_period: "1m"
    environment:
      HOME: "/data"
    volumes:
      - "${APP_DATA_DIR}/data/boltz:/data"
      - "${APP_CORE_LIGHTNING_DATA_DIR}:/cln:ro"
    command:
      - --network=$APP_BITCOIN_NETWORK
      - --cln.datadir=/cln
      - --cln.host=$APP_CORE_LIGHTNING_DAEMON_IP
      - --cln.port=$APP_CORE_LIGHTNING_DAEMON_GRPC_PORT
      - --rpc.rest.host="0.0.0.0"
      - --rpc.rest.port="9003"
