version: "3.7"

services:
  app_proxy:
    environment:
      APP_HOST: lnbits_web_1
      APP_PORT: 3007
      PROXY_AUTH_ADD: "false"
  
  web:
    image: lnbits/lnbits:v1.5.3@sha256:2d4ab0739db02f1659cb50c1901faf7ad37e066d5528075804945305d6009060
    init: true
    restart: on-failure
    stop_grace_period: 1m
    volumes:
      - ${APP_DATA_DIR}/data:/data
      - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro
    environment:
      # Глобальный
      LNBITS_HOST: "0.0.0.0"
      LNBITS_PORT: 3007
      LNBITS_DATA_FOLDER: "/data"

      # ЛНД
      LNBITS_BACKEND_WALLET_CLASS: LndRestWallet
      LND_REST_ENDPOINT: https://$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT/
      LND_REST_CERT: "/lnd/tls.cert"
      LND_REST_MACAROON: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon"

      # Приложение
      LNBITS_SITE_TITLE: "LNbits - DFWebOS"
      LNBITS_DEFAULT_WALLET_NAME: "LNbits wallet"
      LNBITS_DISABLED_EXTENSIONS: "amilk"
      LNBITS_ADMIN_EXTENSIONS: "ngrok"
      LNBITS_ADMIN_UI: "true"
