From 576ecd2bef8d625abceed0f67ec9c487da9b2b1b Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 27 May 2022 17:14:11 +0700 Subject: [PATCH] Add Bitcoin, Lightning, Electrs, ElectrumX and Fulcrum apps Co-authored-by: Steven Briscoe --- README.md | 38 +++++----- agora/docker-compose.yml | 6 +- bitcoin/data/.gitkeep | 0 bitcoin/docker-compose.yml | 36 +++++++++ bitcoin/exports.sh | 85 ++++++++++++++++++++++ bitcoin/scripts/rpcauth.py | 46 ++++++++++++ bitcoin/torrc.template | 11 +++ bitcoin/umbrel-app.yml | 20 +++++ bitfeed/docker-compose.yml | 14 ++-- bleskomat-server/docker-compose.yml | 4 +- bluewallet/docker-compose.yml | 6 +- btc-rpc-explorer/docker-compose.yml | 10 +-- btcpay-server/docker-compose.yml | 18 ++--- electrs/data/.gitkeep | 0 electrs/docker-compose.yml | 44 +++++++++++ electrs/exports.sh | 4 + electrs/torrc.template | 7 ++ electrs/umbrel-app.yml | 20 +++++ electrumx/docker-compose.yml | 35 ++++++--- electrumx/exports.sh | 2 + electrumx/umbrel-app.yml | 20 +++++ fulcrum/docker-compose.yml | 37 ++++++++++ fulcrum/exports.sh | 14 ++++ fulcrum/umbrel-app.yml | 20 +++++ helipad/docker-compose.yml | 4 +- itchysats/docker-compose.yml | 6 +- jam/docker-compose.yml | 10 +-- kollider/docker-compose.yml | 4 +- lightning-shell/docker-compose.yml | 14 ++-- lightning-terminal/docker-compose.yml | 8 +- lightning/data/lightning/.gitkeep | 0 lightning/data/lnd/lnd.conf | 7 ++ lightning/docker-compose.yml | 52 +++++++++++++ lightning/exports.sh | 58 +++++++++++++++ lightning/torrc.template | 11 +++ lightning/umbrel-app.yml | 20 +++++ lnbits/docker-compose.yml | 6 +- lndg/docker-compose.yml | 4 +- lnmarkets/docker-compose.yml | 8 +- mempool/docker-compose.yml | 12 +-- node-red/docker-compose.yml | 20 ++--- ride-the-lightning/docker-compose.yml | 24 +++--- samourai-server/docker-compose.yml | 40 +++++----- samourai-server/exports.sh | 12 +-- satsale/docker-compose.yml | 10 +-- sparkkiosk/docker-compose.yml | 8 +- specter-desktop/docker-compose.yml | 8 +- sphinx-relay/docker-compose.yml | 10 +-- squeaknode/docker-compose.yml | 22 +++--- squeaknode/exports.sh | 2 +- suredbits-wallet/docker-compose.yml | 12 +-- suredbits-wallet/exports.sh | 2 +- tallycoin-connect/docker-compose.yml | 6 +- thunderhub/docker-compose.yml | 4 +- urbit-bitcoin-connector/docker-compose.yml | 14 ++-- usocial/docker-compose.yml | 6 +- 56 files changed, 725 insertions(+), 196 deletions(-) create mode 100644 bitcoin/data/.gitkeep create mode 100644 bitcoin/docker-compose.yml create mode 100644 bitcoin/exports.sh create mode 100755 bitcoin/scripts/rpcauth.py create mode 100644 bitcoin/torrc.template create mode 100644 bitcoin/umbrel-app.yml create mode 100644 electrs/data/.gitkeep create mode 100644 electrs/docker-compose.yml create mode 100644 electrs/exports.sh create mode 100644 electrs/torrc.template create mode 100644 electrs/umbrel-app.yml create mode 100644 electrumx/exports.sh create mode 100644 electrumx/umbrel-app.yml create mode 100644 fulcrum/docker-compose.yml create mode 100644 fulcrum/exports.sh create mode 100644 fulcrum/umbrel-app.yml create mode 100644 lightning/data/lightning/.gitkeep create mode 100644 lightning/data/lnd/lnd.conf create mode 100644 lightning/docker-compose.yml create mode 100644 lightning/exports.sh create mode 100644 lightning/torrc.template create mode 100644 lightning/umbrel-app.yml diff --git a/README.md b/README.md index 7213407..059e22a 100644 --- a/README.md +++ b/README.md @@ -114,11 +114,11 @@ services: # Uncomment to mount LND's data directory as read-only # inside the Docker container at path /lnd - # - ${LND_DATA_DIR}:/lnd:ro + # - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro # Uncomment to mount Bitcoin Core's data directory as # read-only inside the Docker container at path /bitcoin - # - ${BITCOIN_DATA_DIR}:/bitcoin:ro + # - ${APP_BITCOIN_DATA_DIR}:/bitcoin:ro environment: # Pass any environment variables to your app for configuration in the form: # VARIABLE_NAME: value @@ -127,22 +127,22 @@ services: # your app to connect to Bitcoin Core, LND, Electrum and Tor: # # Bitcoin Core environment variables - # $BITCOIN_NETWORK - Can be "mainnet", "testnet" or "regtest" - # $BITCOIN_IP - Local IP of Bitcoin Core - # $BITCOIN_P2P_PORT - P2P port - # $BITCOIN_RPC_PORT - RPC port - # $BITCOIN_RPC_USER - RPC username - # $BITCOIN_RPC_PASS - RPC password - # $BITCOIN_RPC_AUTH - RPC auth string + # $APP_BITCOIN_NETWORK - Can be "mainnet", "testnet" or "regtest" + # $APP_BITCOIN_NODE_IP - Local IP of Bitcoin Core + # $APP_BITCOIN_P2P_PORT - P2P port + # $APP_BITCOIN_RPC_PORT - RPC port + # $APP_BITCOIN_RPC_USER - RPC username + # $APP_BITCOIN_RPC_PASS - RPC password + # $APP_BITCOIN_RPC_AUTH - RPC auth string # # LND environment variables - # $LND_IP - Local IP of LND - # $LND_GRPC_PORT - gRPC Port of LND - # $LND_REST_PORT - REST Port of LND + # $APP_LIGHTNING_NODE_IP - Local IP of LND + # $APP_LIGHTNING_NODE_GRPC_PORT - gRPC Port of LND + # $APP_LIGHTNING_NODE_REST_PORT - REST Port of LND # # Electrum server environment variables - # $ELECTRUM_IP - Local IP of Electrum server - # $ELECTRUM_PORT - Port of Electrum server + # $APP_ELECTRS_NODE_IP - Local IP of Electrum server + # $APP_ELECTRS_NODE_PORT - Port of Electrum server # # Tor proxy environment variables # $TOR_PROXY_IP - Local IP of Tor proxy @@ -199,13 +199,13 @@ services: - 3002:3002 environment: # Bitcoin Core connection details - BTCEXP_BITCOIND_HOST: $BITCOIN_IP - BTCEXP_BITCOIND_PORT: $BITCOIN_RPC_PORT - BTCEXP_BITCOIND_USER: $BITCOIN_RPC_USER - BTCEXP_BITCOIND_PASS: $BITCOIN_RPC_PASS + BTCEXP_BITCOIND_HOST: $APP_BITCOIN_NODE_IP + BTCEXP_BITCOIND_PORT: $APP_BITCOIN_RPC_PORT + BTCEXP_BITCOIND_USER: $APP_BITCOIN_RPC_USER + BTCEXP_BITCOIND_PASS: $APP_BITCOIN_RPC_PASS # Electrum connection details - BTCEXP_ELECTRUMX_SERVERS: "tcp://$ELECTRUM_IP:$ELECTRUM_PORT" + BTCEXP_ELECTRUMX_SERVERS: "tcp://$APP_ELECTRS_NODE_IP:$APP_ELECTRS_NODE_PORT" # App Config BTCEXP_HOST: 0.0.0.0 diff --git a/agora/docker-compose.yml b/agora/docker-compose.yml index 4960e6c..0103a44 100644 --- a/agora/docker-compose.yml +++ b/agora/docker-compose.yml @@ -29,13 +29,13 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/files:/files - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro user: "1000:1000" environment: # LND environment variables - LND_RPC_AUTHORITY: "$LND_IP:$LND_GRPC_PORT" + LND_RPC_AUTHORITY: "$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT" TLS_CERT_PATH: "/lnd/tls.cert" - INVOICES_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/invoice.macaroon" + INVOICES_MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/invoice.macaroon" # App specific environment variables FILES_DIR: "/files" diff --git a/bitcoin/data/.gitkeep b/bitcoin/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/bitcoin/docker-compose.yml b/bitcoin/docker-compose.yml new file mode 100644 index 0000000..efbb867 --- /dev/null +++ b/bitcoin/docker-compose.yml @@ -0,0 +1,36 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: $APP_BITCOIN_IP + APP_PORT: 3005 + + server: + image: cookiemonster123/umbrel-bitcoin:v0.2.0@sha256:74fcac4f811ca0451a6ff108087298f752759b0be9d6c7b116642497dd702a27 + depends_on: [bitcoind] + restart: on-failure + environment: + PORT: "3005" + BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" + RPC_PORT: "${APP_BITCOIN_RPC_PORT}" + RPC_USER: "${APP_BITCOIN_RPC_USER}" + RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" + BITCOIN_RPC_HIDDEN_SERVICE: "${APP_BITCOIN_RPC_HIDDEN_SERVICE}" + BITCOIN_P2P_HIDDEN_SERVICE: "${APP_BITCOIN_P2P_HIDDEN_SERVICE}" + networks: + default: + ipv4_address: $APP_BITCOIN_IP + + bitcoind: + image: lncm/bitcoind:v22.0@sha256:37a1adb29b3abc9f972f0d981f45e41e5fca2e22816a023faa9fdc0084aa4507 + command: "${APP_BITCOIN_COMMAND}" + restart: on-failure + stop_grace_period: 15m30s + volumes: + - "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin" + ports: + - "${APP_BITCOIN_P2P_PORT}:${APP_BITCOIN_P2P_PORT}" + networks: + default: + ipv4_address: $APP_BITCOIN_NODE_IP \ No newline at end of file diff --git a/bitcoin/exports.sh b/bitcoin/exports.sh new file mode 100644 index 0000000..7c0f45e --- /dev/null +++ b/bitcoin/exports.sh @@ -0,0 +1,85 @@ +export APP_BITCOIN_IP="10.21.22.2" +export APP_BITCOIN_NODE_IP="10.21.21.8" + +export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin" +export APP_BITCOIN_RPC_PORT="8332" +export APP_BITCOIN_P2P_PORT="8333" +export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332" +export APP_BITCOIN_ZMQ_RAWTX_PORT="28333" +export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334" +export APP_BITCOIN_ZMQ_SEQUENCE_PORT="28335" + +BITCOIN_CHAIN="main" +BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env" + +if [[ ! -f "${BITCOIN_ENV_FILE}" ]]; then + if [[ -z "${BITCOIN_NETWORK}" ]]; then + BITCOIN_NETWORK="mainnet" + fi + + if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then + BITCOIN_RPC_USER="umbrel" + BITCOIN_RPC_DETAILS=$("${EXPORTS_APP_DIR}/scripts/rpcauth.py" "${BITCOIN_RPC_USER}") + BITCOIN_RPC_PASS=$(echo "$BITCOIN_RPC_DETAILS" | tail -1) + BITCOIN_RPC_AUTH=$(echo "$BITCOIN_RPC_DETAILS" | head -2 | tail -1 | sed -e "s/^rpcauth=//") + fi + + echo "export APP_BITCOIN_NETWORK='${BITCOIN_NETWORK}'" > "${BITCOIN_ENV_FILE}" + echo "export APP_BITCOIN_RPC_USER='${BITCOIN_RPC_USER}'" >> "${BITCOIN_ENV_FILE}" + echo "export APP_BITCOIN_RPC_PASS='${BITCOIN_RPC_PASS}'" >> "${BITCOIN_ENV_FILE}" + echo "export APP_BITCOIN_RPC_AUTH='${BITCOIN_RPC_AUTH}'" >> "${BITCOIN_ENV_FILE}" +fi + +. "${BITCOIN_ENV_FILE}" + +if [[ "${APP_BITCOIN_NETWORK}" == "mainnet" ]]; then + BITCOIN_CHAIN="main" +elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then + BITCOIN_CHAIN="test" + export APP_BITCOIN_RPC_PORT="18332" + export APP_BITCOIN_P2P_PORT="18333" +elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then + BITCOIN_CHAIN="signet" + export APP_BITCOIN_RPC_PORT="38332" + export APP_BITCOIN_P2P_PORT="38333" +elif [[ "${APP_BITCOIN_NETWORK}" == "regtest" ]]; then + BITCOIN_CHAIN="regtest" + export APP_BITCOIN_RPC_PORT="18443" + export APP_BITCOIN_P2P_PORT="18444" +else + echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported" +fi + +BIN_ARGS=() +BIN_ARGS+=( "-chain=${BITCOIN_CHAIN}" ) +BIN_ARGS+=( "-proxy=${TOR_PROXY_IP}:${TOR_PROXY_PORT}" ) +BIN_ARGS+=( "-listen" ) +BIN_ARGS+=( "-bind=${APP_BITCOIN_NODE_IP}" ) +BIN_ARGS+=( "-port=${APP_BITCOIN_P2P_PORT}" ) +BIN_ARGS+=( "-rpcport=${APP_BITCOIN_RPC_PORT}" ) +BIN_ARGS+=( "-rpcbind=${APP_BITCOIN_NODE_IP}" ) +BIN_ARGS+=( "-rpcbind=127.0.0.1" ) +BIN_ARGS+=( "-rpcallowip=${NETWORK_IP}/16" ) +BIN_ARGS+=( "-rpcallowip=127.0.0.1" ) +BIN_ARGS+=( "-rpcauth=\"${APP_BITCOIN_RPC_AUTH}\"" ) +BIN_ARGS+=( "-dbcache=200" ) +BIN_ARGS+=( "-maxmempool=300" ) +BIN_ARGS+=( "-zmqpubrawblock=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_RAWBLOCK_PORT}" ) +BIN_ARGS+=( "-zmqpubrawtx=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_RAWTX_PORT}" ) +BIN_ARGS+=( "-zmqpubhashblock=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_HASHBLOCK_PORT}" ) +BIN_ARGS+=( "-zmqpubsequence=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_SEQUENCE_PORT}" ) +BIN_ARGS+=( "-txindex=1" ) +BIN_ARGS+=( "-blockfilterindex=1" ) +BIN_ARGS+=( "-peerbloomfilters=1" ) +BIN_ARGS+=( "-peerblockfilters=1" ) +BIN_ARGS+=( "-deprecatedrpc=addresses" ) +BIN_ARGS+=( "-rpcworkqueue=128" ) + +export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") + +# echo "${APP_BITCOIN_COMMAND}" + +rpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rpc/hostname" +p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname" +export APP_BITCOIN_RPC_HIDDEN_SERVICE="$(cat "${rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" +export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file diff --git a/bitcoin/scripts/rpcauth.py b/bitcoin/scripts/rpcauth.py new file mode 100755 index 0000000..b14c801 --- /dev/null +++ b/bitcoin/scripts/rpcauth.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python3 +# Copyright (c) 2015-2018 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +from argparse import ArgumentParser +from base64 import urlsafe_b64encode +from binascii import hexlify +from getpass import getpass +from os import urandom + +import hmac + +def generate_salt(size): + """Create size byte hex salt""" + return hexlify(urandom(size)).decode() + +def generate_password(): + """Create 32 byte b64 password""" + return urlsafe_b64encode(urandom(32)).decode('utf-8') + +def password_to_hmac(salt, password): + m = hmac.new(bytearray(salt, 'utf-8'), bytearray(password, 'utf-8'), 'SHA256') + return m.hexdigest() + +def main(): + parser = ArgumentParser(description='Create login credentials for a JSON-RPC user') + parser.add_argument('username', help='the username for authentication') + parser.add_argument('password', help='leave empty to generate a random password or specify "-" to prompt for password', nargs='?') + args = parser.parse_args() + + if not args.password: + args.password = generate_password() + elif args.password == '-': + args.password = getpass() + + # Create 16 byte hex salt + salt = generate_salt(16) + password_hmac = password_to_hmac(salt, args.password) + + print('String to be appended to bitcoin.conf:') + print('rpcauth={0}:{1}${2}'.format(args.username, salt, password_hmac)) + print('Your password:\n{0}'.format(args.password)) + +if __name__ == '__main__': + main() diff --git a/bitcoin/torrc.template b/bitcoin/torrc.template new file mode 100644 index 0000000..740b2ab --- /dev/null +++ b/bitcoin/torrc.template @@ -0,0 +1,11 @@ +# Bitcoin Core P2P Hidden Service +HiddenServiceDir /data/app-$APP_ID-p2p +HiddenServicePort $APP_BITCOIN_P2P_PORT $APP_BITCOIN_NODE_IP:$APP_BITCOIN_P2P_PORT + +# Bitcoin Core RPC Hidden Service +HiddenServiceDir /data/app-$APP_ID-rpc +HiddenServicePort $APP_BITCOIN_RPC_PORT $APP_BITCOIN_NODE_IP:$APP_BITCOIN_RPC_PORT + +# Bitcoin Core Frontend Hidden Service +HiddenServiceDir /data/app-$APP_ID +HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT \ No newline at end of file diff --git a/bitcoin/umbrel-app.yml b/bitcoin/umbrel-app.yml new file mode 100644 index 0000000..0956ef3 --- /dev/null +++ b/bitcoin/umbrel-app.yml @@ -0,0 +1,20 @@ +manifestVersion: 1 +id: bitcoin +category: Finance +name: Bitcoin +version: v22.0 +tagline: Bitcoins are amazing +description: > + Bitcoin is the knees of the bee +developer: Umbrel +website: https://bitcoin.org +dependencies: [] +repo: https://github.com/getumbrel/bitcoin +support: https://github.com/getumbrel/bitcoin/issues +port: 10000 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultPassword: "" \ No newline at end of file diff --git a/bitfeed/docker-compose.yml b/bitfeed/docker-compose.yml index 19514c3..c13d202 100644 --- a/bitfeed/docker-compose.yml +++ b/bitfeed/docker-compose.yml @@ -27,13 +27,13 @@ services: stop_grace_period: 1m environment: PORT: "$APP_BITFEED_API_PORT" - BITCOIN_HOST: "$BITCOIN_IP" - BITCOIN_ZMQ_RAWTX_PORT: "$BITCOIN_ZMQ_RAWTX_PORT" - BITCOIN_ZMQ_RAWBLOCK_PORT: "$BITCOIN_ZMQ_RAWBLOCK_PORT" - BITCOIN_ZMQ_SEQUENCE_PORT: "$BITCOIN_ZMQ_SEQUENCE_PORT" - BITCOIN_RPC_PORT: "$BITCOIN_RPC_PORT" - BITCOIN_RPC_USER: "$BITCOIN_RPC_USER" - BITCOIN_RPC_PASS: "$BITCOIN_RPC_PASS" + BITCOIN_HOST: "$APP_BITCOIN_NODE_IP" + BITCOIN_ZMQ_RAWTX_PORT: "$APP_BITCOIN_ZMQ_RAWTX_PORT" + BITCOIN_ZMQ_RAWBLOCK_PORT: "$APP_BITCOIN_ZMQ_RAWBLOCK_PORT" + BITCOIN_ZMQ_SEQUENCE_PORT: "$APP_BITCOIN_ZMQ_SEQUENCE_PORT" + BITCOIN_RPC_PORT: "$APP_BITCOIN_RPC_PORT" + BITCOIN_RPC_USER: "$APP_BITCOIN_RPC_USER" + BITCOIN_RPC_PASS: "$APP_BITCOIN_RPC_PASS" RPC_POOLS: "1" RPC_POOL_SIZE: "16" LOG_LEVEL: "info" diff --git a/bleskomat-server/docker-compose.yml b/bleskomat-server/docker-compose.yml index e07a8a7..4ccedac 100644 --- a/bleskomat-server/docker-compose.yml +++ b/bleskomat-server/docker-compose.yml @@ -30,7 +30,7 @@ services: - db volumes: - $APP_DATA_DIR/data/web:/usr/src/app/data - - $LND_DATA_DIR:/lnd:ro + - $APP_LIGHTNING_NODE_DATA_DIR:/lnd:ro environment: DEBUG: "bleskomat-server*,lnurl*" BLESKOMAT_SERVER_HOST: "0.0.0.0" @@ -38,7 +38,7 @@ services: BLESKOMAT_SERVER_URL: "$APP_HIDDEN_SERVICE" BLESKOMAT_SERVER_ENDPOINT: "/u" BLESKOMAT_SERVER_AUTH_API_KEYS: '[]' - BLESKOMAT_SERVER_LIGHTNING: '{"backend":"lnd","config":{"cert":"/lnd/tls.cert","protocol":"https","hostname":"$LND_IP:$LND_REST_PORT","macaroon":"/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon"}}' + BLESKOMAT_SERVER_LIGHTNING: '{"backend":"lnd","config":{"cert":"/lnd/tls.cert","protocol":"https","hostname":"$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT","macaroon":"/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon"}}' BLESKOMAT_SERVER_STORE: '{"backend":"knex","config":{"client":"postgres","connection":{"host":"$APP_BLESKOMAT_SERVER_DB_IP","port":5432,"user":"bleskomat_server","password":"moneyprintergobrrr","database":"bleskomat_server"}}}' BLESKOMAT_SERVER_COINRATES_DEFAULTS_PROVIDER: "coinbase" BLESKOMAT_SERVER_ADMIN_WEB: "true" diff --git a/bluewallet/docker-compose.yml b/bluewallet/docker-compose.yml index 024c40a..19fe18d 100644 --- a/bluewallet/docker-compose.yml +++ b/bluewallet/docker-compose.yml @@ -27,13 +27,13 @@ services: stop_grace_period: "1m" init: true volumes: - - "${LND_DATA_DIR}:/lnd:ro" + - "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro" environment: PORT: "${APP_BLUEWALLET_LNDHUB_PORT}" TOR_URL: "${APP_HIDDEN_SERVICE}" LND_CERT_FILE: "/lnd/tls.cert" - LND_ADMIN_MACAROON_FILE: "/lnd/data/chain/bitcoin/${BITCOIN_NETWORK}/admin.macaroon" - CONFIG: '{ "rateLimit": 10000, "postRateLimit": 10000, "redis": { "port": 6379, "host": "$APP_BLUEWALLET_REDIS_IP", "family": 4, "password": "moneyprintergobrrr", "db": 0 }, "lnd": { "url": "$LND_IP:$LND_GRPC_PORT", "password": ""}}' + LND_ADMIN_MACAROON_FILE: "/lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon" + CONFIG: '{ "rateLimit": 10000, "postRateLimit": 10000, "redis": { "port": 6379, "host": "$APP_BLUEWALLET_REDIS_IP", "family": 4, "password": "moneyprintergobrrr", "db": 0 }, "lnd": { "url": "$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT", "password": ""}}' networks: default: ipv4_address: "${APP_BLUEWALLET_LNDHUB_IP}" diff --git a/btc-rpc-explorer/docker-compose.yml b/btc-rpc-explorer/docker-compose.yml index 6b22fe8..7516286 100644 --- a/btc-rpc-explorer/docker-compose.yml +++ b/btc-rpc-explorer/docker-compose.yml @@ -14,13 +14,13 @@ services: # Docker requirements BTCEXP_HOST: 0.0.0.0 # Bitcoin Core - BTCEXP_BITCOIND_HOST: $BITCOIN_IP - BTCEXP_BITCOIND_PORT: $BITCOIN_RPC_PORT - BTCEXP_BITCOIND_USER: $BITCOIN_RPC_USER - BTCEXP_BITCOIND_PASS: $BITCOIN_RPC_PASS + BTCEXP_BITCOIND_HOST: $APP_BITCOIN_NODE_IP + BTCEXP_BITCOIND_PORT: $APP_BITCOIN_RPC_PORT + BTCEXP_BITCOIND_USER: $APP_BITCOIN_RPC_USER + BTCEXP_BITCOIND_PASS: $APP_BITCOIN_RPC_PASS # Electrum BTCEXP_ADDRESS_API: electrumx - BTCEXP_ELECTRUMX_SERVERS: "tcp://$ELECTRUM_IP:$ELECTRUM_PORT" + BTCEXP_ELECTRUMX_SERVERS: "tcp://$APP_ELECTRS_NODE_IP:$APP_ELECTRS_NODE_PORT" # Log level DEBUG: "btcexp:*,electrumClient" # Performance diff --git a/btcpay-server/docker-compose.yml b/btcpay-server/docker-compose.yml index 8509265..ccf3c18 100644 --- a/btcpay-server/docker-compose.yml +++ b/btcpay-server/docker-compose.yml @@ -15,15 +15,15 @@ services: - ${APP_DATA_DIR}/data/nbxplorer:/data environment: NBXPLORER_DATADIR: "/data" - NBXPLORER_NETWORK: "$BITCOIN_NETWORK" + NBXPLORER_NETWORK: "$APP_BITCOIN_NETWORK" NBXPLORER_PORT: 32838 NBXPLORER_BIND: 0.0.0.0 NBXPLORER_CHAINS: "btc" NBXPLORER_SIGNALFILEDIR: "/data" - NBXPLORER_BTCRPCURL: "http://$BITCOIN_IP:$BITCOIN_RPC_PORT" - NBXPLORER_BTCNODEENDPOINT: $BITCOIN_IP:$BITCOIN_P2P_PORT - NBXPLORER_BTCRPCUSER: $BITCOIN_RPC_USER - NBXPLORER_BTCRPCPASSWORD: $BITCOIN_RPC_PASS + NBXPLORER_BTCRPCURL: "http://$APP_BITCOIN_NODE_IP:$APP_BITCOIN_RPC_PORT" + NBXPLORER_BTCNODEENDPOINT: $APP_BITCOIN_NODE_IP:$APP_BITCOIN_P2P_PORT + NBXPLORER_BTCRPCUSER: $APP_BITCOIN_RPC_USER + NBXPLORER_BTCRPCPASSWORD: $APP_BITCOIN_RPC_PASS networks: default: ipv4_address: $APP_BTCPAY_SERVER_NBXPLORER_IP @@ -38,18 +38,18 @@ services: volumes: - ${APP_DATA_DIR}/data/btcpay:/data - ${APP_DATA_DIR}/data/nbxplorer:/data/.nbxplorer - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: HOME: "/data" BTCPAY_DATADIR: "/data" BTCPAY_PLUGINDIR: "/data/plugins" BTCPAY_DOCKERDEPLOYMENT: "false" - BTCPAY_POSTGRES: "User ID=postgres;Host=$APP_BTCPAY_SERVER_DB_IP;Port=5432;Database=btcpayserver$BITCOIN_NETWORK" - BTCPAY_NETWORK: "$BITCOIN_NETWORK" + BTCPAY_POSTGRES: "User ID=postgres;Host=$APP_BTCPAY_SERVER_DB_IP;Port=5432;Database=btcpayserver$APP_BITCOIN_NETWORK" + BTCPAY_NETWORK: "$APP_BITCOIN_NETWORK" BTCPAY_BIND: 0.0.0.0:$APP_BTCPAY_SERVER_PORT BTCPAY_CHAINS: "btc" BTCPAY_BTCEXPLORERURL: "http://$APP_BTCPAY_SERVER_NBXPLORER_IP:32838" - BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=https://$LND_IP:$LND_REST_PORT/;macaroonfilepath=/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon;allowinsecure=true" + BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=https://$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT/;macaroonfilepath=/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon;allowinsecure=true" BTCPAY_SOCKSENDPOINT: $TOR_PROXY_IP:$TOR_PROXY_PORT networks: default: diff --git a/electrs/data/.gitkeep b/electrs/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/electrs/docker-compose.yml b/electrs/docker-compose.yml new file mode 100644 index 0000000..2f130e2 --- /dev/null +++ b/electrs/docker-compose.yml @@ -0,0 +1,44 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: $APP_ELECTRS_IP + APP_PORT: 3006 + + app: + image: cookiemonster123/umbrel-electrs:v1.0.1@sha256:0a447406c64523b30429d8d70751e6bc19b3fdb830b778555d3904a6cce2f5b5 + depends_on: + - electrs + restart: on-failure + environment: + ELECTRUM_HIDDEN_SERVICE: "${APP_HIDDEN_SERVICE}" + ELECTRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}" + ELECTRS_HOST: "${APP_ELECTRS_NODE_IP}" + BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" + RPC_USER: "${APP_BITCOIN_RPC_USER}" + RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" + networks: + default: + ipv4_address: $APP_ELECTRS_IP + + electrs: + image: getumbrel/electrs:v0.9.4@sha256:b1590ac6cfb0e5b481c6a7af7f0626d76cbb91c63702b0f5c47e2829e9c37997 + restart: always + environment: + ELECTRS_LOG_FILTERS: "INFO" + ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK}" + ELECTRS_DAEMON_RPC_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" + ELECTRS_DAEMON_P2P_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_P2P_PORT}" + ELECTRS_ELECTRUM_RPC_ADDR: "0.0.0.0:${APP_ELECTRS_NODE_PORT}" + ELECTRS_SERVER_BANNER: "Umbrel Electrs (${APP_VERSION})" + ELECTRS_DB_DIR: "/data/db" + ELECTRS_COOKIE_FILE: "/data/.bitcoin/${APP_BITCOIN_NETWORK}/.cookie" + volumes: + - "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin:ro" + - "${APP_DATA_DIR}/data/electrs:/data" + ports: + - "${APP_ELECTRS_NODE_PORT}:${APP_ELECTRS_NODE_PORT}" + networks: + default: + ipv4_address: $APP_ELECTRS_NODE_IP \ No newline at end of file diff --git a/electrs/exports.sh b/electrs/exports.sh new file mode 100644 index 0000000..17a919f --- /dev/null +++ b/electrs/exports.sh @@ -0,0 +1,4 @@ +export APP_ELECTRS_IP="10.21.22.4" +export APP_ELECTRS_NODE_IP="10.21.21.10" + +export APP_ELECTRS_NODE_PORT="50001" \ No newline at end of file diff --git a/electrs/torrc.template b/electrs/torrc.template new file mode 100644 index 0000000..5caef98 --- /dev/null +++ b/electrs/torrc.template @@ -0,0 +1,7 @@ +# Electrs RPC Hidden Service +HiddenServiceDir /data/app-$APP_ID-rpc +HiddenServicePort $APP_ELECTRS_NODE_PORT $APP_ELECTRS_NODE_IP:$APP_ELECTRS_NODE_PORT + +# Electrs Frontend Hidden Service +HiddenServiceDir /data/app-$APP_ID +HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT \ No newline at end of file diff --git a/electrs/umbrel-app.yml b/electrs/umbrel-app.yml new file mode 100644 index 0000000..0c2a5ec --- /dev/null +++ b/electrs/umbrel-app.yml @@ -0,0 +1,20 @@ +manifestVersion: 1 +id: electrs +category: Finance +name: Electrs +version: v0.14.1-beta +tagline: Electrs needs a tagline +description: > + Description goes here +developer: Umbrel +website: https://getumbrel.com/ +dependencies: [] +repo: https://github.com/getumbrel/electrs +support: https://github.com/getumbrel/electrs/issues +port: 10002 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultPassword: "" \ No newline at end of file diff --git a/electrumx/docker-compose.yml b/electrumx/docker-compose.yml index ae55bff..8823361 100644 --- a/electrumx/docker-compose.yml +++ b/electrumx/docker-compose.yml @@ -4,19 +4,34 @@ services: app_proxy: environment: APP_HOST: $APP_ELECTRUMX_IP - APP_PORT: 50001 + APP_PORT: 3007 - server: + app: + image: getumbrel/umbrel-electrumx + depends_on: + - electrumx + restart: on-failure + environment: + ELECTRUM_HIDDEN_SERVICE: "${APP_HIDDEN_SERVICE}" + ELECTRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}" + ELECTRUM_HOST: "${APP_ELECTRUMX_NODE_IP}" + BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" + RPC_USER: "${APP_BITCOIN_RPC_USER}" + RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" + networks: + default: + ipv4_address: $APP_ELECTRUMX_IP + + electrumx: image: lukechilds/electrumx:v1.16.0@sha256:2949784536f8f85af229004e12e5b5c3a1d7428918a492f77b4e958035c2ae2a - user: "1000:1000" init: true - restart: on-failure - stop_grace_period: 1m - volumes: - - ${APP_DATA_DIR}/data:/data environment: - DAEMON_URL: http://${BITCOIN_RPC_USER}:${BITCOIN_RPC_PASS}@${BITCOIN_IP}:${BITCOIN_RPC_PORT} + DAEMON_URL: "http://${APP_BITCOIN_RPC_USER}:${APP_BITCOIN_RPC_PASS}@${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" COIN: BitcoinSegwit + NET: "${APP_BITCOIN_NETWORK}" + volumes: + - ${APP_DATA_DIR}/data:/data + restart: always networks: - default: - ipv4_address: $APP_ELECTRUMX_IP \ No newline at end of file + default: + ipv4_address: $APP_ELECTRUMX_NODE_IP \ No newline at end of file diff --git a/electrumx/exports.sh b/electrumx/exports.sh new file mode 100644 index 0000000..74a53a9 --- /dev/null +++ b/electrumx/exports.sh @@ -0,0 +1,2 @@ +export APP_ELECTRUMX_IP="10.21.22.5" +export APP_ELECTRUMX_NODE_IP="10.21.21.59" \ No newline at end of file diff --git a/electrumx/umbrel-app.yml b/electrumx/umbrel-app.yml new file mode 100644 index 0000000..e247737 --- /dev/null +++ b/electrumx/umbrel-app.yml @@ -0,0 +1,20 @@ +manifestVersion: 1 +id: electrumx +category: Finance +name: Electrumx +version: v1.16.0 +tagline: Electrumx needs a tagline +description: > + Description goes here +developer: Umbrel +website: https://getumbrel.com/ +dependencies: [] +repo: https://github.com/getumbrel/electrumx +support: https://github.com/getumbrel/electrumx/issues +port: 10004 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultPassword: "" \ No newline at end of file diff --git a/fulcrum/docker-compose.yml b/fulcrum/docker-compose.yml new file mode 100644 index 0000000..f1821b4 --- /dev/null +++ b/fulcrum/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: $APP_FULCRUM_IP + APP_PORT: 3006 + + app: + image: getumbrel/umbrel-fulcrum + depends_on: + - fulcrum + restart: on-failure + environment: + FULCRUM_HIDDEN_SERVICE: "${APP_HIDDEN_SERVICE}" + FULCRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}" + FULCRUM_HOST: "${APP_FULCRUM_NODE_IP}" + FULCRUM_STATS_PORT: 8080 + BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" + RPC_USER: "${APP_BITCOIN_RPC_USER}" + RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" + RPC_PORT: "${APP_BITCOIN_RPC_PORT}" + networks: + default: + ipv4_address: $APP_FULCRUM_IP + + fulcrum: + image: cculianu/fulcrum + init: true + command: "${APP_FULCRUM_COMMAND}" + volumes: + - "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin:ro" + - "${APP_DATA_DIR}/data:/data" + restart: always + networks: + default: + ipv4_address: $APP_FULCRUM_NODE_IP \ No newline at end of file diff --git a/fulcrum/exports.sh b/fulcrum/exports.sh new file mode 100644 index 0000000..be30373 --- /dev/null +++ b/fulcrum/exports.sh @@ -0,0 +1,14 @@ +export APP_FULCRUM_IP="10.21.22.6" +export APP_FULCRUM_NODE_IP="10.21.22.7" + +BIN_NAME="Fulcrum" +BIN_ARGS=() +BIN_ARGS+=( "--datadir /data/${APP_BITCOIN_NETWORK}" ) +BIN_ARGS+=( "--bitcoind ${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" ) +BIN_ARGS+=( "--rpcuser ${APP_BITCOIN_RPC_USER}" ) +BIN_ARGS+=( "--rpcpassword ${APP_BITCOIN_RPC_PASS}" ) +BIN_ARGS+=( "--tcp 0.0.0.0:50001" ) + +export APP_FULCRUM_COMMAND="${BIN_NAME} $(IFS=" "; echo "${BIN_ARGS[@]}")" + +# echo "${APP_FULCRUM_COMMAND}" \ No newline at end of file diff --git a/fulcrum/umbrel-app.yml b/fulcrum/umbrel-app.yml new file mode 100644 index 0000000..409a607 --- /dev/null +++ b/fulcrum/umbrel-app.yml @@ -0,0 +1,20 @@ +manifestVersion: 1 +id: fulcrum +category: Finance +name: Fulcrum +version: 1.6.0 +tagline: Fulcrum is great, init +description: > + Hello World +developer: Umbrel +website: https://getumbrel.com/ +dependencies: [] +repo: https://github.com/getumbrel/fulcrum +support: https://github.com/getumbrel/fulcrum/issues +port: 10003 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultPassword: "" \ No newline at end of file diff --git a/helipad/docker-compose.yml b/helipad/docker-compose.yml index 5510b11..9e30f6b 100644 --- a/helipad/docker-compose.yml +++ b/helipad/docker-compose.yml @@ -14,9 +14,9 @@ services: user: "1000:1000" volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: - LND_URL: "$LND_IP:$LND_GRPC_PORT" + LND_URL: "$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT" networks: default: ipv4_address: $APP_HELIPAD_IP diff --git a/itchysats/docker-compose.yml b/itchysats/docker-compose.yml index 6593541..a259903 100644 --- a/itchysats/docker-compose.yml +++ b/itchysats/docker-compose.yml @@ -13,12 +13,12 @@ services: volumes: - ${APP_DATA_DIR}/data:/data command: - - --maker=$BITCOIN_NETWORK.itchysats.network:10000 + - --maker=$APP_BITCOIN_NETWORK.itchysats.network:10000 - --maker-id=7e35e34801e766a6a29ecb9e22810ea4e3476c2b37bf75882edf94a68b1d9607 - --password=$APP_PASSWORD - --umbrel-seed=$APP_SEED - - $BITCOIN_NETWORK - - --electrum=tcp://$ELECTRUM_IP:$ELECTRUM_PORT + - $APP_BITCOIN_NETWORK + - --electrum=tcp://$APP_ELECTRS_NODE_IP:$APP_ELECTRS_NODE_PORT networks: default: diff --git a/jam/docker-compose.yml b/jam/docker-compose.yml index 24cc1e8..a2c913c 100644 --- a/jam/docker-compose.yml +++ b/jam/docker-compose.yml @@ -24,12 +24,12 @@ services: jm_onion_socks5_port: $TOR_PROXY_PORT jm_socks5_host: $TOR_PROXY_IP jm_socks5_port: $TOR_PROXY_PORT - jm_rpc_host: $BITCOIN_IP - jm_rpc_port: $BITCOIN_RPC_PORT - jm_rpc_user: $BITCOIN_RPC_USER - jm_rpc_password: "${BITCOIN_RPC_PASS}" + jm_rpc_host: $APP_BITCOIN_NODE_IP + jm_rpc_port: $APP_BITCOIN_RPC_PORT + jm_rpc_user: $APP_BITCOIN_RPC_USER + jm_rpc_password: "${APP_BITCOIN_RPC_PASS}" jm_rpc_wallet_file: jam_default - jm_network: $BITCOIN_NETWORK + jm_network: $APP_BITCOIN_NETWORK jm_max_cj_fee_abs: 300000 # in sats jm_max_cj_fee_rel: 0.0003 # 0.03% networks: diff --git a/kollider/docker-compose.yml b/kollider/docker-compose.yml index 0e45c16..9702e40 100644 --- a/kollider/docker-compose.yml +++ b/kollider/docker-compose.yml @@ -12,10 +12,10 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data/logs:/app/logs environment: - LND_IP: $LND_IP + LND_IP: $APP_LIGHTNING_NODE_IP LND_ZMQ_SUB_ADDRESS: "tcp://${APP_KOLLIDER_WS_IP}:5556" networks: default: diff --git a/lightning-shell/docker-compose.yml b/lightning-shell/docker-compose.yml index 4764fba..c196856 100644 --- a/lightning-shell/docker-compose.yml +++ b/lightning-shell/docker-compose.yml @@ -10,16 +10,16 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data:/data environment: APP_PASSWORD: "${APP_PASSWORD}" - BITCOIN_IP: "${BITCOIN_IP}" - BITCOIN_RPC_PORT: "${BITCOIN_RPC_PORT}" - BITCOIN_RPC_USER: "${BITCOIN_RPC_USER}" - BITCOIN_RPC_PASS: "${BITCOIN_RPC_PASS}" - LND_IP: "${LND_IP}" - LND_GRPC_PORT: ${LND_GRPC_PORT} + BITCOIN_IP: "${APP_BITCOIN_NODE_IP}" + BITCOIN_RPC_PORT: "${APP_BITCOIN_RPC_PORT}" + BITCOIN_RPC_USER: "${APP_BITCOIN_RPC_USER}" + BITCOIN_RPC_PASS: "${APP_BITCOIN_RPC_PASS}" + LND_IP: "${APP_LIGHTNING_NODE_IP}" + LND_GPRC_PORT: ${APP_LIGHTNING_NODE_GRPC_PORT} networks: default: ipv4_address: $APP_LIGHTNING_SHELL_IP diff --git a/lightning-terminal/docker-compose.yml b/lightning-terminal/docker-compose.yml index d05b94f..8d3cf2b 100644 --- a/lightning-terminal/docker-compose.yml +++ b/lightning-terminal/docker-compose.yml @@ -13,17 +13,17 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${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:$APP_LIGHTNING_TERMINAL_PORT - - --network="$BITCOIN_NETWORK" + - --network="$APP_BITCOIN_NETWORK" - --lnd-mode="remote" - - --remote.lnd.rpcserver=$LND_IP:$LND_GRPC_PORT - - --remote.lnd.macaroonpath="/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + - --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" networks: default: diff --git a/lightning/data/lightning/.gitkeep b/lightning/data/lightning/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/lightning/data/lnd/lnd.conf b/lightning/data/lnd/lnd.conf new file mode 100644 index 0000000..f825634 --- /dev/null +++ b/lightning/data/lnd/lnd.conf @@ -0,0 +1,7 @@ +[Application Options] +maxpendingchannels=3 +minchansize=10000 +accept-keysend=true + +[Bitcoin] +bitcoin.defaultchanconfs=2 \ No newline at end of file diff --git a/lightning/docker-compose.yml b/lightning/docker-compose.yml new file mode 100644 index 0000000..a5e8dcc --- /dev/null +++ b/lightning/docker-compose.yml @@ -0,0 +1,52 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: $APP_LIGHTNING_IP + APP_PORT: 3006 + + app: + image: cookiemonster123/umbrel-lightning:v1.0.2@sha256:41d651ec0ba1fba9173bd06cbf2a1093dd2ba0485432aea177a9255ae3211934 + restart: on-failure + volumes: + - "${APP_LIGHTNING_NODE_DATA_DIR}:/data/.lnd" + - "${APP_DATA_DIR}/data/lightning:/data" + - "${UMBREL_ROOT}/statuses:/statuses" + environment: + PORT: "3006" + TOR_PROXY_IP: "${TOR_PROXY_IP}" + TOR_PROXY_PORT: "${TOR_PROXY_PORT}" + BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" + RPC_PORT: "${APP_BITCOIN_RPC_PORT}" + RPC_USER: "${APP_BITCOIN_RPC_USER}" + RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" + LND_NETWORK: "${APP_BITCOIN_NETWORK}" + LND_HOST: "${APP_LIGHTNING_NODE_IP}" + LND_REST_HIDDEN_SERVICE_FILE: "${APP_LIGHTNING_REST_HIDDEN_SERVICE}" + LND_GRPC_HIDDEN_SERVICE_FILE: "${APP_LIGHTNING_GRPC_HIDDEN_SERVICE}" + TLS_FILE: "/data/.lnd/tls.cert" + MACAROON_DIR: "/data/.lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/" + CHANNEL_BACKUP_FILE: "/data/.lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/channel.backup" + BACKUP_STATUS_FILE: "/statuses/backup-status.json" + JSON_STORE_FILE: "/data/state.json" + ports: + - "$APP_LIGHTNING_NODE_PORT:$APP_LIGHTNING_NODE_PORT" + - "$APP_LIGHTNING_NODE_REST_PORT:$APP_LIGHTNING_NODE_REST_PORT" + - "$APP_LIGHTNING_NODE_GRPC_PORT:$APP_LIGHTNING_NODE_GRPC_PORT" + networks: + default: + ipv4_address: $APP_LIGHTNING_IP + + lnd: + image: lightninglabs/lnd:v0.14.1-beta@sha256:810f290f4da51adaf57d53bc1f1e65b52b03c543f322da0b98fb8c47be94a27a + command: "${APP_LIGHTNING_COMMAND}" + user: 1000:1000 + restart: on-failure + volumes: + - "${APP_LIGHTNING_NODE_DATA_DIR}:/data/.lnd" + environment: + HOME: /data + networks: + default: + ipv4_address: $APP_LIGHTNING_NODE_IP \ No newline at end of file diff --git a/lightning/exports.sh b/lightning/exports.sh new file mode 100644 index 0000000..58a10bc --- /dev/null +++ b/lightning/exports.sh @@ -0,0 +1,58 @@ +export APP_LIGHTNING_IP="10.21.22.3" +export APP_LIGHTNING_NODE_IP="10.21.21.9" + +export APP_LIGHTNING_NODE_PORT="9735" +export APP_LIGHTNING_NODE_GRPC_PORT="10009" +export APP_LIGHTNING_NODE_REST_PORT="8080" +export APP_LIGHTNING_NODE_DATA_DIR="${EXPORTS_APP_DIR}/data/lnd" + +LND_BITCOIN_NODE="bitcoind" + +BIN_ARGS=() +# [Application Options] +BIN_ARGS+=( "--listen=0.0.0.0:${APP_LIGHTNING_NODE_PORT}" ) +BIN_ARGS+=( "--rpclisten=0.0.0.0:${APP_LIGHTNING_NODE_GRPC_PORT}" ) +BIN_ARGS+=( "--restlisten=0.0.0.0:${APP_LIGHTNING_NODE_REST_PORT}" ) +BIN_ARGS+=( "--tlsextraip=${APP_LIGHTNING_NODE_IP}" ) +BIN_ARGS+=( "--tlsextradomain=${DEVICE_DOMAIN_NAME}" ) +BIN_ARGS+=( "--tlsautorefresh" ) +BIN_ARGS+=( "--tlsdisableautofill" ) + +# [Bitcoind] +BIN_ARGS+=( "--bitcoind.rpchost=${APP_BITCOIN_NODE_IP}" ) +BIN_ARGS+=( "--bitcoind.rpcuser=${APP_BITCOIN_RPC_USER}" ) +BIN_ARGS+=( "--bitcoind.rpcpass=${APP_BITCOIN_RPC_PASS}" ) +BIN_ARGS+=( "--bitcoind.zmqpubrawblock=tcp://${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_ZMQ_RAWBLOCK_PORT}" ) +BIN_ARGS+=( "--bitcoind.zmqpubrawtx=tcp://${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_ZMQ_RAWTX_PORT}" ) + +# [Bitcoin] +BIN_ARGS+=( "--bitcoin.active" ) +if [[ "${APP_BITCOIN_NETWORK}" == "mainnet" ]]; then + BIN_ARGS+=( "--bitcoin.mainnet" ) +elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then + BIN_ARGS+=( "--bitcoin.testnet" ) +elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then + BIN_ARGS+=( "--bitcoin.signet" ) +elif [[ "${APP_BITCOIN_NETWORK}" == "regtest" ]]; then + BIN_ARGS+=( "--bitcoin.regtest" ) +else + echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported" +fi +BIN_ARGS+=( "--bitcoin.node=${LND_BITCOIN_NODE}" ) + +# [tor] +BIN_ARGS+=( "--tor.active" ) +BIN_ARGS+=( "--tor.v3" ) +BIN_ARGS+=( "--tor.control=${TOR_PROXY_IP}:29051" ) +BIN_ARGS+=( "--tor.socks=${TOR_PROXY_IP}:${TOR_PROXY_PORT}" ) +BIN_ARGS+=( "--tor.targetipaddress=${APP_LIGHTNING_NODE_IP}" ) +BIN_ARGS+=( "--tor.password=${TOR_PASSWORD}" ) + +export APP_LIGHTNING_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") + +# echo "${APP_LIGHTNING_COMMAND}" + +rest_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rest/hostname" +grpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-grpc/hostname" +export APP_LIGHTNING_REST_HIDDEN_SERVICE="$(cat "${rest_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" +export APP_LIGHTNING_GRPC_HIDDEN_SERVICE="$(cat "${grpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file diff --git a/lightning/torrc.template b/lightning/torrc.template new file mode 100644 index 0000000..66931f4 --- /dev/null +++ b/lightning/torrc.template @@ -0,0 +1,11 @@ +# LND REST Hidden Service +HiddenServiceDir /data/app-$APP_ID-rest +HiddenServicePort $APP_LIGHTNING_NODE_REST_PORT $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT + +# LND gRPC Hidden Service +HiddenServiceDir /data/app-$APP_ID-grpc +HiddenServicePort $APP_LIGHTNING_NODE_GRPC_PORT $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT + +# LND Frontend Hidden Service +HiddenServiceDir /data/app-$APP_ID +HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT \ No newline at end of file diff --git a/lightning/umbrel-app.yml b/lightning/umbrel-app.yml new file mode 100644 index 0000000..1b7e79b --- /dev/null +++ b/lightning/umbrel-app.yml @@ -0,0 +1,20 @@ +manifestVersion: 1 +id: lightning +category: Finance +name: Lightning +version: v0.14.1-beta +tagline: LND is cool too +description: > + "there was lightning before the thunder" +developer: Umbrel +website: https://getumbrel.com/ +dependencies: [] +repo: https://github.com/getumbrel/lightning +support: https://github.com/getumbrel/lightning/issues +port: 10001 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultPassword: "" \ No newline at end of file diff --git a/lnbits/docker-compose.yml b/lnbits/docker-compose.yml index 1e8dd82..8b64fc5 100644 --- a/lnbits/docker-compose.yml +++ b/lnbits/docker-compose.yml @@ -13,7 +13,7 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: # Global LNBITS_HOST: "0.0.0.0" @@ -22,9 +22,9 @@ services: # LND LNBITS_BACKEND_WALLET_CLASS: LndRestWallet - LND_REST_ENDPOINT: https://$LND_IP:$LND_REST_PORT/ + 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/$BITCOIN_NETWORK/admin.macaroon" + LND_REST_MACAROON: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" # App LNBITS_SITE_TITLE: "LNbits - Umbrel" diff --git a/lndg/docker-compose.yml b/lndg/docker-compose.yml index 4ab3feb..439611d 100644 --- a/lndg/docker-compose.yml +++ b/lndg/docker-compose.yml @@ -11,12 +11,12 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/root/.lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/root/.lnd:ro - ${APP_DATA_DIR}:/lndg/data command: - sh - -c - - python initialize.py -net '${BITCOIN_NETWORK}' -server '${LND_IP}:${LND_GRPC_PORT}' -pw '${APP_PASSWORD}' -d && supervisord && python manage.py runserver 0.0.0.0:${APP_LNDG_PORT} + - python initialize.py -net '${APP_BITCOIN_NETWORK}' -server '${APP_LIGHTNING_NODE_IP}:${APP_LIGHTNING_NODE_GRPC_PORT}' -pw '${APP_PASSWORD}' -d && supervisord && python manage.py runserver 0.0.0.0:${APP_LNDG_PORT} networks: default: ipv4_address: ${APP_LNDG_IP} diff --git a/lnmarkets/docker-compose.yml b/lnmarkets/docker-compose.yml index c297920..7fca417 100644 --- a/lnmarkets/docker-compose.yml +++ b/lnmarkets/docker-compose.yml @@ -12,11 +12,11 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: - LND_IP: $LND_IP - LND_GRPC_PORT: $LND_GRPC_PORT - BITCOIN_NETWORK: $BITCOIN_NETWORK + LND_IP: $APP_LIGHTNING_NODE_IP + LND_GPRC_PORT: $APP_LIGHTNING_NODE_GRPC_PORT + BITCOIN_NETWORK: $APP_BITCOIN_NETWORK APP_HIDDEN_SERVICE: $APP_HIDDEN_SERVICE APP_DOMAIN: $APP_DOMAIN APP_PASSWORD: $APP_PASSWORD diff --git a/mempool/docker-compose.yml b/mempool/docker-compose.yml index c915eb4..1fb2492 100644 --- a/mempool/docker-compose.yml +++ b/mempool/docker-compose.yml @@ -28,12 +28,12 @@ services: volumes: - ${APP_DATA_DIR}/data:/backend/cache environment: - CORE_RPC_HOST: $BITCOIN_IP - CORE_RPC_PORT: $BITCOIN_RPC_PORT - CORE_RPC_USERNAME: $BITCOIN_RPC_USER - CORE_RPC_PASSWORD: $BITCOIN_RPC_PASS - ELECTRUM_HOST: $ELECTRUM_IP - ELECTRUM_PORT: $ELECTRUM_PORT + CORE_RPC_HOST: $APP_BITCOIN_NODE_IP + CORE_RPC_PORT: $APP_BITCOIN_RPC_PORT + CORE_RPC_USERNAME: $APP_BITCOIN_RPC_USER + CORE_RPC_PASSWORD: $APP_BITCOIN_RPC_PASS + ELECTRUM_HOST: $APP_ELECTRS_NODE_IP + ELECTRUM_PORT: $APP_ELECTRS_NODE_PORT ELECTRUM_TLS: "false" DATABASE_HOST: $APP_MEMPOOL_DB_IP DATABASE_PORT: "3306" diff --git a/node-red/docker-compose.yml b/node-red/docker-compose.yml index 15c9fce..3e620de 100644 --- a/node-red/docker-compose.yml +++ b/node-red/docker-compose.yml @@ -11,18 +11,18 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: PORT: $APP_NODE_RED_PORT - BITCOIN_NETWORK: $BITCOIN_NETWORK - BITCOIN_IP: $BITCOIN_IP - BITCOIN_RPC_PORT: $BITCOIN_RPC_PORT - BITCOIN_RPC_USER: $BITCOIN_RPC_USER - BITCOIN_RPC_PASS: $BITCOIN_RPC_PASS - LND_IP: $LND_IP - LND_GRPC_PORT: $LND_GRPC_PORT - ELECTRUM_IP: $ELECTRUM_IP - ELECTRUM_PORT: $ELECTRUM_PORT + BITCOIN_NETWORK: $APP_BITCOIN_NETWORK + BITCOIN_IP: $APP_BITCOIN_NODE_IP + BITCOIN_RPC_PORT: $APP_BITCOIN_RPC_PORT + BITCOIN_RPC_USER: $APP_BITCOIN_RPC_USER + BITCOIN_RPC_PASS: $APP_BITCOIN_RPC_PASS + LND_IP: $APP_LIGHTNING_NODE_IP + LND_GPRC_PORT: $APP_LIGHTNING_NODE_GRPC_PORT + ELECTRUM_IP: $APP_ELECTRS_NODE_IP + ELECTRUM_PORT: $APP_ELECTRS_NODE_PORT networks: default: ipv4_address: $APP_NODE_RED_IP diff --git a/ride-the-lightning/docker-compose.yml b/ride-the-lightning/docker-compose.yml index 36f5ad3..e96b338 100644 --- a/ride-the-lightning/docker-compose.yml +++ b/ride-the-lightning/docker-compose.yml @@ -14,8 +14,8 @@ services: - ${APP_DATA_DIR}/rtl:/data - ${APP_DATA_DIR}/loop:/loop - ${APP_DATA_DIR}/boltz:/boltz:ro - - ${LND_DATA_DIR}:/lnd:ro - - ${BITCOIN_DATA_DIR}:/bitcoin:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro + - ${APP_BITCOIN_DATA_DIR}:/bitcoin:ro entrypoint: /data/entrypoint.sh environment: # App config @@ -26,13 +26,13 @@ services: LN_IMPLEMENTATION: "LND" # LND connection details - LN_SERVER_URL: "https://$LND_IP:$LND_REST_PORT" - MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK" + LN_SERVER_URL: "https://$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT" + MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK" CONFIG_PATH: "/lnd/lnd.conf" # Loop SWAP_SERVER_URL: "https://$APP_RIDE_THE_LIGHTNING_LOOP_IP:8081" - SWAP_MACAROON_PATH: "/loop/.loop/$BITCOIN_NETWORK" + SWAP_MACAROON_PATH: "/loop/.loop/$APP_BITCOIN_NETWORK" # Boltz BOLTZ_SERVER_URL: "https://$APP_RIDE_THE_LIGHTNING_BOLTZ_IP:9003" @@ -48,13 +48,13 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/loop:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: HOME: "/data" command: - - --network=$BITCOIN_NETWORK - - --lnd.host="$LND_IP:$LND_GRPC_PORT" - - --lnd.macaroonpath="/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + - --network=$APP_BITCOIN_NETWORK + - --lnd.host="$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT" + - --lnd.macaroonpath="/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" - --lnd.tlspath="/lnd/tls.cert" - --restlisten=0.0.0.0:8081 networks: @@ -70,10 +70,10 @@ services: HOME: "/data" volumes: - "${APP_DATA_DIR}/boltz:/data" - - "${LND_DATA_DIR}:/lnd:ro" + - "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro" command: - - --lnd.host="$LND_IP" - - --lnd.macaroon="/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + - --lnd.host="$APP_LIGHTNING_NODE_IP" + - --lnd.macaroon="/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" - --lnd.certificate="/lnd/tls.cert" - --rpc.rest.host="$APP_RIDE_THE_LIGHTNING_BOLTZ_IP" - --rpc.rest.port="9003" diff --git a/samourai-server/docker-compose.yml b/samourai-server/docker-compose.yml index 8fb0274..56fab43 100644 --- a/samourai-server/docker-compose.yml +++ b/samourai-server/docker-compose.yml @@ -30,7 +30,7 @@ services: user: "1000:1000" environment: # GLOBAL - COMMON_BTC_NETWORK: $BITCOIN_NETWORK + COMMON_BTC_NETWORK: $APP_BITCOIN_NETWORK DOJO_VERSION_TAG: 1.15.0 NET_DOJO_TOR_IPV4: $TOR_PROXY_IP TOR_SOCKS_PORT: $TOR_PROXY_PORT @@ -61,24 +61,24 @@ services: NODE_FEE_TYPE: ECONOMICAL # SECURITY - NODE_API_KEY: $SAMOURAI_SERVER_NODE_API_KEY - NODE_ADMIN_KEY: $SAMOURAI_SERVER_NODE_ADMIN_KEY - NODE_JWT_SECRET: $SAMOURAI_SERVER_NODE_JWT_SECRET + NODE_API_KEY: $APP_SAMOURAI_SERVER_NODE_API_KEY + NODE_ADMIN_KEY: $APP_SAMOURAI_SERVER_NODE_ADMIN_KEY + NODE_JWT_SECRET: $APP_SAMOURAI_SERVER_NODE_JWT_SECRET # BITCOIN - BITCOIND_IP: $BITCOIN_IP - BITCOIND_RPC_PORT: $BITCOIN_RPC_PORT - BITCOIND_RPC_USER: $BITCOIN_RPC_USER - BITCOIND_RPC_PASSWORD: $BITCOIN_RPC_PASS - BITCOIND_ZMQ_RAWTXS: $BITCOIN_ZMQ_RAWTX_PORT - BITCOIND_ZMQ_BLK_HASH: $BITCOIN_ZMQ_HASHBLOCK_PORT + BITCOIND_IP: $APP_BITCOIN_NODE_IP + BITCOIND_RPC_PORT: $APP_BITCOIN_RPC_PORT + BITCOIND_RPC_USER: $APP_BITCOIN_RPC_USER + BITCOIND_RPC_PASSWORD: $APP_BITCOIN_RPC_PASS + BITCOIND_ZMQ_RAWTXS: $APP_BITCOIN_ZMQ_RAWTX_PORT + BITCOIND_ZMQ_BLK_HASH: $APP_BITCOIN_ZMQ_HASHBLOCK_PORT # EXPLORER EXPLORER_INSTALL: "off" # INDEXER - INDEXER_IP: $ELECTRUM_IP - INDEXER_RPC_PORT: $ELECTRUM_PORT + INDEXER_IP: $APP_ELECTRS_NODE_IP + INDEXER_RPC_PORT: $APP_ELECTRS_NODE_PORT INDEXER_PROTOCOL: tcp INDEXER_BATCH_SUPPORT: inactive # 'active' for ElectrumX, 'inactive' otherwise depends_on: @@ -94,7 +94,7 @@ services: user: "1000:1000" command: - "--listen" - - "--cli.apiKey=$SAMOURAI_SERVER_WHIRLPOOL_API_KEY" + - "--cli.apiKey=$APP_SAMOURAI_SERVER_WHIRLPOOL_API_KEY" - "--cli.api.http-enable=true" - "--cli.api.http-port=$APP_SAMOURAI_SERVER_WHIRLPOOL_PORT" - "--cli.tor=true" @@ -106,7 +106,7 @@ services: - "--cli.mix.clientsPerPool=1" - "--resync" environment: - WHIRLPOOL_BITCOIN_NETWORK: $BITCOIN_NETWORK + WHIRLPOOL_BITCOIN_NETWORK: $APP_BITCOIN_NETWORK WHIRLPOOL_DOJO: "on" WHIRLPOOL_DOJO_IP: $APP_SAMOURAI_SERVER_IP volumes: @@ -123,17 +123,17 @@ services: volumes: - ${APP_DATA_DIR}/nginx/wait-for:/wait-for - ${APP_DATA_DIR}/nginx/nginx.conf:/etc/nginx/nginx.conf - - ${APP_DATA_DIR}/nginx/${BITCOIN_NETWORK}.conf:/etc/nginx/sites-enabled/dojo.conf + - ${APP_DATA_DIR}/nginx/${APP_BITCOIN_NETWORK}.conf:/etc/nginx/sites-enabled/dojo.conf - ${APP_DATA_DIR}/nginx/connect.conf:/etc/nginx/sites-enabled/connect.conf - ${APP_DATA_DIR}/nginx/connect:/var/www/connect environment: - COMMON_BTC_NETWORK: $BITCOIN_NETWORK + COMMON_BTC_NETWORK: $APP_BITCOIN_NETWORK DOJO_LOCAL_PORT: $APP_SAMOURAI_SERVER_DOJO_PORT - DOJO_HIDDEN_SERVICE: $SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE - WHIRLPOOL_HIDDEN_SERVICE: $SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE + DOJO_HIDDEN_SERVICE: $APP_SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE + WHIRLPOOL_HIDDEN_SERVICE: $APP_SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE NODE_PREFIX_SUPPORT: support - NODE_ADMIN_KEY: $SAMOURAI_SERVER_NODE_ADMIN_KEY - WHIRLPOOL_API_KEY: $SAMOURAI_SERVER_WHIRLPOOL_API_KEY + NODE_ADMIN_KEY: $APP_SAMOURAI_SERVER_NODE_ADMIN_KEY + WHIRLPOOL_API_KEY: $APP_SAMOURAI_SERVER_WHIRLPOOL_API_KEY ports: - "$APP_SAMOURAI_SERVER_DOJO_PORT:80" depends_on: diff --git a/samourai-server/exports.sh b/samourai-server/exports.sh index 0933310..e82785e 100644 --- a/samourai-server/exports.sh +++ b/samourai-server/exports.sh @@ -8,9 +8,9 @@ export APP_SAMOURAI_SERVER_NODE_IP="10.21.21.25" dojo_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-dojo/hostname" whirlpool_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-whirlpool/hostname" -export SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE="$(cat "${dojo_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" -export SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE="$(cat "${whirlpool_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" -export SAMOURAI_SERVER_NODE_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_API_KEY") -export SAMOURAI_SERVER_NODE_ADMIN_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_ADMIN_KEY") -export SAMOURAI_SERVER_NODE_JWT_SECRET=$(derive_entropy "env-${app_entropy_identifier}-NODE_JWT_SECRET") -export SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY") \ No newline at end of file +export APP_SAMOURAI_SERVER_DOJO_HIDDEN_SERVICE="$(cat "${dojo_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" +export APP_SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE="$(cat "${whirlpool_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" +export APP_SAMOURAI_SERVER_NODE_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_API_KEY") +export APP_SAMOURAI_SERVER_NODE_ADMIN_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_ADMIN_KEY") +export APP_SAMOURAI_SERVER_NODE_JWT_SECRET=$(derive_entropy "env-${app_entropy_identifier}-NODE_JWT_SECRET") +export APP_SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY") \ No newline at end of file diff --git a/satsale/docker-compose.yml b/satsale/docker-compose.yml index 6395897..19b6cd6 100644 --- a/satsale/docker-compose.yml +++ b/satsale/docker-compose.yml @@ -11,14 +11,14 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: DATA_DIR: "/data" # Lightning node connection details - LND_DATA_DIR: $LND_DATA_DIR - LND_HOST: $LND_IP - LND_GRPC_PORT: $LND_GRPC_PORT - MACAROON_FILE: /lnd/data/chain/bitcoin/${BITCOIN_NETWORK}/invoice.macaroon + LND_DATA_DIR: $APP_LIGHTNING_NODE_DATA_DIR + LND_HOST: $APP_LIGHTNING_NODE_IP + LND_GPRC_PORT: $APP_LIGHTNING_NODE_GRPC_PORT + MACAROON_FILE: /lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/invoice.macaroon TLS_FILE: /lnd/tls.cert APP_PASSWORD: $APP_PASSWORD networks: diff --git a/sparkkiosk/docker-compose.yml b/sparkkiosk/docker-compose.yml index 18d0b03..11f1cee 100644 --- a/sparkkiosk/docker-compose.yml +++ b/sparkkiosk/docker-compose.yml @@ -14,16 +14,16 @@ services: stop_grace_period: 1m volumes: - ${APP_DATA_DIR}/data:/data - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro environment: # Global # LND - LND_GRPC_ENDPOINT: $LND_IP - LND_GRPC_PORT: $LND_GRPC_PORT + LND_GRPC_ENDPOINT: $APP_LIGHTNING_NODE_IP + LND_GPRC_PORT: $APP_LIGHTNING_NODE_GRPC_PORT LND_GRPC_CERT: "/lnd/tls.cert" - LND_GRPC_MACAROON: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + LND_GRPC_MACAROON: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" # App APP_HIDDEN_SERVICE: http://$APP_HIDDEN_SERVICE diff --git a/specter-desktop/docker-compose.yml b/specter-desktop/docker-compose.yml index 72b92d5..7243a7e 100644 --- a/specter-desktop/docker-compose.yml +++ b/specter-desktop/docker-compose.yml @@ -18,10 +18,10 @@ services: - --specter-data-folder=/data environment: # TODO: APP_PASSWORD - BTC_RPC_USER: $BITCOIN_RPC_USER - BTC_RPC_PASSWORD: $BITCOIN_RPC_PASS - BTC_RPC_HOST: $BITCOIN_IP - BTC_RPC_PORT: $BITCOIN_RPC_PORT + BTC_RPC_USER: $APP_BITCOIN_RPC_USER + BTC_RPC_PASSWORD: $APP_BITCOIN_RPC_PASS + BTC_RPC_HOST: $APP_BITCOIN_NODE_IP + BTC_RPC_PORT: $APP_BITCOIN_RPC_PORT BTC_RPC_PROTOCOL: http networks: default: diff --git a/sphinx-relay/docker-compose.yml b/sphinx-relay/docker-compose.yml index bfefdca..2fbabff 100644 --- a/sphinx-relay/docker-compose.yml +++ b/sphinx-relay/docker-compose.yml @@ -13,16 +13,16 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data:/relay/.lnd/ environment: PUBLIC_URL: "$APP_HIDDEN_SERVICE:$APP_SPHINX_RELAY_PORT" - LND_IP: $LND_IP + LND_IP: $APP_LIGHTNING_NODE_IP CONNECT_UI: "true" - LND_PORT: $LND_GRPC_PORT + LND_PORT: $APP_LIGHTNING_NODE_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 + MACAROON_LOCATION: /lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon + LND_LOG_LOCATION: /lnd/logs/bitcoin/${APP_BITCOIN_NETWORK}/lnd.log networks: default: ipv4_address: $APP_SPHINX_RELAY_IP diff --git a/squeaknode/docker-compose.yml b/squeaknode/docker-compose.yml index b77e058..c1a4cb7 100644 --- a/squeaknode/docker-compose.yml +++ b/squeaknode/docker-compose.yml @@ -14,21 +14,21 @@ services: - "$APP_SQUEAKNODE_GRPC_PORT:$APP_SQUEAKNODE_GRPC_PORT" volumes: - ${APP_DATA_DIR}/sqk:/sqk - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro user: "1000:1000" environment: # Bitcoin Core connection details - SQUEAKNODE_BITCOIN_RPC_HOST: $BITCOIN_IP - SQUEAKNODE_BITCOIN_RPC_PORT: $BITCOIN_RPC_PORT - SQUEAKNODE_BITCOIN_RPC_USER: $BITCOIN_RPC_USER - SQUEAKNODE_BITCOIN_RPC_PASS: $BITCOIN_RPC_PASS - SQUEAKNODE_BITCOIN_ZEROMQ_HASHBLOCK_PORT: $BITCOIN_ZMQ_HASHBLOCK_PORT + SQUEAKNODE_BITCOIN_RPC_HOST: $APP_BITCOIN_NODE_IP + SQUEAKNODE_BITCOIN_RPC_PORT: $APP_BITCOIN_RPC_PORT + SQUEAKNODE_BITCOIN_RPC_USER: $APP_BITCOIN_RPC_USER + SQUEAKNODE_BITCOIN_RPC_PASS: $APP_BITCOIN_RPC_PASS + SQUEAKNODE_BITCOIN_ZEROMQ_HASHBLOCK_PORT: $APP_BITCOIN_ZMQ_HASHBLOCK_PORT # LND environment variables - SQUEAKNODE_LND_HOST: $LND_IP - SQUEAKNODE_LND_RPC_PORT: $LND_GRPC_PORT + SQUEAKNODE_LND_HOST: $APP_LIGHTNING_NODE_IP + SQUEAKNODE_LND_RPC_PORT: $APP_LIGHTNING_NODE_GRPC_PORT SQUEAKNODE_LND_TLS_CERT_PATH: "/lnd/tls.cert" - SQUEAKNODE_LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + SQUEAKNODE_LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" # Tor environment variables SQUEAKNODE_TOR_PROXY_IP: $TOR_PROXY_IP @@ -39,11 +39,11 @@ services: SQUEAKNODE_WEBADMIN_USERNAME: "umbrel" SQUEAKNODE_WEBADMIN_PASSWORD: "${APP_PASSWORD}" - SQUEAKNODE_NODE_NETWORK: "$BITCOIN_NETWORK" + SQUEAKNODE_NODE_NETWORK: "$APP_BITCOIN_NETWORK" SQUEAKNODE_NODE_SQK_DIR_PATH: "/sqk" SQUEAKNODE_NODE_MAX_SQUEAKS: 10000 - SQUEAKNODE_SERVER_EXTERNAL_ADDRESS: $SQUEAKNODE_P2P_HIDDEN_SERVICE + SQUEAKNODE_SERVER_EXTERNAL_ADDRESS: $APP_SQUEAKNODE_P2P_HIDDEN_SERVICE DEBUG: "squeaknode:*" networks: diff --git a/squeaknode/exports.sh b/squeaknode/exports.sh index 33662c3..7bcd11e 100644 --- a/squeaknode/exports.sh +++ b/squeaknode/exports.sh @@ -5,4 +5,4 @@ export APP_SQUEAKNODE_P2P_PORT="8555" export APP_SQUEAKNODE_P2P_TESTNET_PORT="18555" squeaknode_p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname" -export SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file +export APP_SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file diff --git a/suredbits-wallet/docker-compose.yml b/suredbits-wallet/docker-compose.yml index 5154c32..6164687 100644 --- a/suredbits-wallet/docker-compose.yml +++ b/suredbits-wallet/docker-compose.yml @@ -36,18 +36,18 @@ services: volumes: - ${APP_DATA_DIR}/data/wallet:/home/bitcoin-s/.bitcoin-s environment: - BITCOIN_S_NETWORK: $BITCOIN_NETWORK + BITCOIN_S_NETWORK: $APP_BITCOIN_NETWORK BITCOIN_S_KEYMANAGER_ENTROPY: $APP_SEED BITCOIN_S_PROXY_ENABLED: "false" BITCOIN_S_TOR_ENABLED: "false" BITCOIN_S_TOR_PROVIDED: "true" BITCOIN_S_DLCNODE_PROXY_ENABLED: "true" BITCOIN_S_DLCNODE_PROXY_SOCKS5: "${TOR_PROXY_IP}:${TOR_PROXY_PORT}" - BITCOIN_S_DLCNODE_EXTERNAL_IP: $SUREDBITS_WALLET_P2P_HIDDEN_SERVICE - BITCOIN_S_BITCOIND_HOST: $BITCOIN_IP - BITCOIN_S_BITCOIND_PORT: $BITCOIN_RPC_PORT - BITCOIN_S_BITCOIND_USER: $BITCOIN_RPC_USER - BITCOIN_S_BITCOIND_PASSWORD: $BITCOIN_RPC_PASS + BITCOIN_S_DLCNODE_EXTERNAL_IP: $APP_SUREDBITS_WALLET_P2P_HIDDEN_SERVICE + BITCOIN_S_BITCOIND_HOST: $APP_BITCOIN_NODE_IP + BITCOIN_S_BITCOIND_PORT: $APP_BITCOIN_RPC_PORT + BITCOIN_S_BITCOIND_USER: $APP_BITCOIN_RPC_USER + BITCOIN_S_BITCOIND_PASSWORD: $APP_BITCOIN_RPC_PASS BITCOIN_S_SERVER_RPC_PASSWORD: $APP_PASSWORD ports: - "$APP_SUREDBITS_WALLET_P2P_PORT:$APP_SUREDBITS_WALLET_P2P_PORT" diff --git a/suredbits-wallet/exports.sh b/suredbits-wallet/exports.sh index 94b313d..7d76acc 100644 --- a/suredbits-wallet/exports.sh +++ b/suredbits-wallet/exports.sh @@ -4,4 +4,4 @@ export APP_SUREDBITS_WALLET_SERVER_IP="10.21.21.74" export APP_SUREDBITS_WALLET_P2P_PORT="2862" suredbits_wallet_p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname" -export SUREDBITS_WALLET_P2P_HIDDEN_SERVICE="$(cat "${suredbits_wallet_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file +export APP_SUREDBITS_WALLET_P2P_HIDDEN_SERVICE="$(cat "${suredbits_wallet_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" \ No newline at end of file diff --git a/tallycoin-connect/docker-compose.yml b/tallycoin-connect/docker-compose.yml index 30d64be..1e95e03 100644 --- a/tallycoin-connect/docker-compose.yml +++ b/tallycoin-connect/docker-compose.yml @@ -12,11 +12,11 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data:/data environment: - LND_SOCKET: "$LND_IP:$LND_GRPC_PORT" - LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + LND_SOCKET: "$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT" + LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$APP_BITCOIN_NETWORK/admin.macaroon" LND_TLSCERT_PATH: "/lnd/tls.cert" CONFIG_FILE: "/data/tallycoin_api.key" TALLYCOIN_PASSWD_CLEARTEXT: "$APP_PASSWORD" diff --git a/thunderhub/docker-compose.yml b/thunderhub/docker-compose.yml index 93f385a..b4d8ecd 100644 --- a/thunderhub/docker-compose.yml +++ b/thunderhub/docker-compose.yml @@ -12,7 +12,7 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data:/data entrypoint: /data/entrypoint.sh environment: @@ -20,7 +20,7 @@ services: NO_VERSION_CHECK: "true" LOG_LEVEL: "debug" ACCOUNT_CONFIG_PATH: "/data/thubConfig.yaml" - YML_ENV_1: "$LND_IP:$LND_GRPC_PORT" + YML_ENV_1: "$APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT" TOR_PROXY_SERVER: "socks://$TOR_PROXY_IP:$TOR_PROXY_PORT" networks: default: diff --git a/urbit-bitcoin-connector/docker-compose.yml b/urbit-bitcoin-connector/docker-compose.yml index 50ddad1..120f9e8 100644 --- a/urbit-bitcoin-connector/docker-compose.yml +++ b/urbit-bitcoin-connector/docker-compose.yml @@ -15,13 +15,13 @@ services: - ${APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT}:${APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT} environment: INTERNAL_IP: $APP_URBIT_BITCOIN_CONNECTOR_IP - ELECTRUM_IP: $ELECTRUM_IP - ELECTRUM_PORT: $ELECTRUM_PORT - BITCOIN_IP: $BITCOIN_IP - BITCOIN_RPC_PORT: $BITCOIN_RPC_PORT - BITCOIN_RPC_USER: $BITCOIN_RPC_USER - BITCOIN_RPC_PASS: $BITCOIN_RPC_PASS - BITCOIN_RPC_AUTH: $BITCOIN_RPC_AUTH + ELECTRUM_IP: $APP_ELECTRS_NODE_IP + ELECTRUM_PORT: $APP_ELECTRS_NODE_PORT + BITCOIN_IP: $APP_BITCOIN_NODE_IP + BITCOIN_RPC_PORT: $APP_BITCOIN_RPC_PORT + BITCOIN_RPC_USER: $APP_BITCOIN_RPC_USER + BITCOIN_RPC_PASS: $APP_BITCOIN_RPC_PASS + BITCOIN_RPC_AUTH: $APP_BITCOIN_RPC_AUTH networks: default: ipv4_address: $APP_URBIT_BITCOIN_CONNECTOR_IP diff --git a/usocial/docker-compose.yml b/usocial/docker-compose.yml index 0b29cae..3d52ce8 100644 --- a/usocial/docker-compose.yml +++ b/usocial/docker-compose.yml @@ -11,13 +11,13 @@ services: restart: on-failure stop_grace_period: 1m volumes: - - ${LND_DATA_DIR}:/lnd:ro + - ${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro - ${APP_DATA_DIR}/data:/instance environment: USOCIAL_JOB: "WEB" APP_PASSWORD: "${APP_PASSWORD}" - LND_IP: "${LND_IP}" - LND_GRPC_PORT: ${LND_GRPC_PORT} + LND_IP: "${APP_LIGHTNING_NODE_IP}" + LND_GPRC_PORT: ${APP_LIGHTNING_NODE_GRPC_PORT} LND_DIR: "/lnd" networks: default: