Browse Source

Add sphinx-relay app (#341)

exclude-app-data-chown
Gonzalo Aune 4 years ago
committed by GitHub
parent
commit
9f46a08b39
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 0
      apps/sphinx-relay/data/.gitkeep
  2. 29
      apps/sphinx-relay/docker-compose.yml
  3. 4
      scripts/configure
  4. 2
      templates/.env-sample
  5. 7
      templates/torrc-sample

0
apps/sphinx-relay/data/.gitkeep

29
apps/sphinx-relay/docker-compose.yml

@ -0,0 +1,29 @@
version: "3.7"
x-logging: &default-logging
driver: journald
options:
tag: "umbrel-app {{.Name}}"
services:
sphinx-relay:
container_name: sphinx-relay
image: sphinxlightning/sphinx-relay:v1.2.9@sha256:21e457a44efc8286c6fa066204db72d45c47417676d802ed3e0e4cbc923b87c0
restart: on-failure
logging: *default-logging
volumes:
- ${LND_DATA_DIR}:/lnd:ro
- ${APP_DATA_DIR}/data:/relay/.lnd/
ports:
- "$APP_SPHINX_RELAY_PORT:$APP_SPHINX_RELAY_PORT"
environment:
PUBLIC_URL: "$APP_HIDDEN_SERVICE:$APP_SPHINX_RELAY_PORT"
LND_IP: $LND_IP
CONNECT_UI: "true"
LND_PORT: $LND_GRPC_PORT
TLS_LOCATION: /lnd/tls.cert
MACAROON_LOCATION: /lnd/data/chain/bitcoin/${BITCOIN_NETWORK}/admin.macaroon
LND_LOG_LOCATION: /lnd/logs/bitcoin/${BITCOIN_NETWORK}/lnd.log
networks:
default:
ipv4_address: $APP_SPHINX_RELAY_IP

4
scripts/configure

@ -125,6 +125,8 @@ APP_BTC_RPC_EXPLORER_IP="10.0.1.0"
APP_BTC_RPC_EXPLORER_PORT="3002"
APP_THUNDERHUB_IP="10.0.1.1"
APP_THUNDERHUB_PORT="3000"
APP_SPHINX_RELAY_IP="10.0.1.2"
APP_SPHINX_RELAY_PORT="3300"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -249,6 +251,8 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-btc-rpc-explorer-port>/${APP_BTC_RPC_EXPLORER_PORT}/g" "${template}"
sed -i "s/<app-thunderhub-ip>/${APP_THUNDERHUB_IP}/g" "${template}"
sed -i "s/<app-thunderhub-port>/${APP_THUNDERHUB_PORT}/g" "${template}"
sed -i "s/<app-sphinx-relay-ip>/${APP_SPHINX_RELAY_IP}/g" "${template}"
sed -i "s/<app-sphinx-relay-port>/${APP_SPHINX_RELAY_PORT}/g" "${template}"
done

2
templates/.env-sample

@ -29,3 +29,5 @@ APP_BTC_RPC_EXPLORER_IP=<app-btc-rpc-explorer-ip>
APP_BTC_RPC_EXPLORER_PORT=<app-btc-rpc-explorer-port>
APP_THUNDERHUB_IP=<app-thunderhub-ip>
APP_THUNDERHUB_PORT=<app-thunderhub-port>
APP_SPHINX_RELAY_IP=<app-sphinx-relay-ip>
APP_SPHINX_RELAY_PORT=<app-sphinx-relay-port>

7
templates/torrc-sample

@ -38,4 +38,11 @@ HiddenServicePort 80 <app-btc-rpc-explorer-ip>:<app-btc-rpc-explorer-port>
HiddenServiceDir /var/lib/tor/app-thunderhub
HiddenServicePort 80 <app-thunderhub-ip>:<app-thunderhub-port>
# sphinx-relay Hidden Service
# We expose 80 for the connection string UI and <app-sphinx-relay-port> for the
# actual server connection
HiddenServiceDir /var/lib/tor/app-sphinx-relay
HiddenServicePort 80 <app-sphinx-relay-ip>:<app-sphinx-relay-port>
HiddenServicePort <app-sphinx-relay-port> <app-sphinx-relay-ip>:<app-sphinx-relay-port>
HashedControlPassword <password>

Loading…
Cancel
Save