version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: lightning-terminal_web_1
      APP_PORT: 3004

  web:
    image: lightninglabs/lightning-terminal:v0.10.4-alpha@sha256:1260fad6f3930c2933d27223663e6b35beb9bbb730dac13c186ff48086b153f7
    user: "1000:1000"
    restart: on-failure
    stop_grace_period: 1m
    volumes:
      - ${APP_DATA_DIR}/data:/data
      - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro
    environment:
      HOME: "/data"
      APP_PASSWORD: "$APP_PASSWORD"
    command:
        - --uipassword_env=APP_PASSWORD
        - --insecure-httplisten=0.0.0.0:3004
        - --network="$APP_BITCOIN_NETWORK"
        - --lnd-mode="remote"
        - --remote.lnd.rpcserver=$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT
        - --remote.lnd.macaroonpath="/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon"
        - --remote.lnd.tlscertpath="/lnd/tls.cert"
