stakwork / sphinx-relay

Node.js wrapper for communication between sphinx client and lightning node.
MIT License
247 stars 71 forks source link

Is this docker image legit? #364

Closed CalebFenton closed 2 years ago

CalebFenton commented 2 years ago

I'm trying to figure out how to run this and connect it to my own LND node. It looks like I can use this: https://hub.docker.com/r/sphinxlightning/sphinx-relay and share a few volumes between LND and relay but I have no idea who made it or how it got there since it doesn't seem to come from this repository.

Is this an official image and if so where is the Dockerfile that's creating it? Am I missing something obvious?

kevkevinpal commented 2 years ago

yea thats the correct one you can see the workflow we use to create them here

https://github.com/stakwork/sphinx-relay/blob/master/.github/workflows/docker-build.yml

kevkevinpal commented 2 years ago

its using docker buildx

CalebFenton commented 2 years ago

Thanks, this helps!

CalebFenton commented 2 years ago

For anyone else trying to get sphinx-relay to talk to their own LND node using docker-compose, here's my setup:

  sphinx-relay:
    restart: unless-stopped
    image: sphinxlightning/sphinx-relay:latest
    depends_on:
      - lnd
    container_name: sphinx-relay
    hostname: sphinx-relay
    environment:
      TZ: America/Chicago
      NODE_ENV: production
      # NODE_IP: sphinx-relay
      # NODE_ALIAS: ${LIGHTNING_ALIAS}
      LND_IP: lnd
      LND_PORT: 10009
      PORT: 3300
      # MACAROON_LOCATION: /relay/lnd/admin.macaroon
      # ROUTER_MACAROON_LOCATION: /relay/lnd/data/chain/bitcoin/mainnet/router.macaroon
      # SIGNER_MACAROON_LOCATION: /relay/lnd/data/chain/bitcoin/mainnet/signer.macaroon
      # TLS_LOCATION: /relay/lnd/tls.cert
      # LND_LOG_LOCATION: /relay/lnd/logs/bitcoin/mainnet/lnd.log
      PUBLIC_URL: http://satellite.overmind.home:3300
    ports:
      - 3300:3300
    volumes:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - /mnt/cache/lnd:/relay/.lnd

The first non-obvious part is relay looks for certain environment variables which allows you to point it at your node.

The second is that without setting up port forwarding and possibly the PUBLIC_URL, you may get "Generate token failed" errors.

Can't wait to start playing with this. Thanks for the project :D

Evanfeenstra commented 2 years ago

Thanks for posting your docker-compose @CalebFenton! Definitely is a help to others

kevkevinpal commented 2 years ago

@CalebFenton we could add your sample to our docker deployment doc lemme know if there's anything you'd want to add/change to this PR

https://github.com/stakwork/sphinx-relay/pull/365