Browse Source
Add elements app (#1319 )
Co-authored-by: Marco Argentieri <tiero@MacBook-Pro-di-Marco.local>
Co-authored-by: Duncan <dabloem@gmail.com>
Co-authored-by: Luke Childs <lukechilds123@gmail.com>
btcpay
Marco Argentieri
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with
113 additions and
2 deletions
apps/elements/data/.gitkeep
apps/elements/docker-compose.yml
apps/registry.json
scripts/app
scripts/configure
templates/.env-sample
templates/torrc-server-sample
@ -0,0 +1,56 @@
version : "3.8"
services:
node:
image : ghcr.io/vulpemventures/elements:0.21.0.2@sha256:60f082b13b366743ef3cd113cb20397b586fd7032c0eb9c0a2a242ebc528f537
restart : on -failure
stop_grace_period : 1m
ports:
- $APP_ELEMENTS_NODE_RPC_PORT:$APP_ELEMENTS_NODE_RPC_PORT # JSONRPC
- $APP_ELEMENTS_NODE_P2P_PORT:$APP_ELEMENTS_NODE_P2P_PORT # P2P PORT
volumes:
- ${APP_DATA_DIR}/data:/home/elements/.elements
command:
- -listen=1
- -txindex=1
- -validatepegin=1
- -fallbackfee=0.000001
# Attach to Bitcoin network
- -mainchainrpchost=$BITCOIN_IP
- -mainchainrpcport=$BITCOIN_RPC_PORT
- -mainchainrpcuser=$BITCOIN_RPC_USER
- -mainchainrpcpassword=$BITCOIN_RPC_PASS
# Elements RPC
- -rpcuser=elements
- -rpcpassword=$APP_PASSWORD
- -rpcbind=0.0.0.0 # can we do better here?
- -rpcallowip=0.0.0.0/0 # can we do better here?
- -rpcport=$APP_ELEMENTS_NODE_RPC_PORT
# P2P
- -port=$APP_ELEMENTS_NODE_P2P_PORT
- -blockfilterindex=1
- -peerblockfilters=1
networks:
default:
ipv4_address : $APP_ELEMENTS_NODE_IP
web :
image : ghcr.io/tiero/elements-web:v0.0.3@sha256:b80dc0df2a4693668a97b874aad6d0a8d3239d03f4d05b4342600166934d0b87
depends_on:
- node
restart : on -failure
ports:
- $APP_ELEMENTS_PORT:8080
environment:
RPC_USER : elements
RPC_PASS : $APP_PASSWORD
RPC_PORT : $APP_ELEMENTS_NODE_RPC_PORT
RPC_HOST : $APP_ELEMENTS_NODE_IP
P2P_PORT : $APP_ELEMENTS_NODE_P2P_PORT
# Remote
REMOTE_RPC_HOST : $ELEMENTS_RPC_HIDDEN_SERVICE
REMOTE_P2P_HOST : $ELEMENTS_P2P_HIDDEN_SERVICE
networks:
default:
ipv4_address : $APP_ELEMENTS_IP
@ -1064,5 +1064,29 @@
"path" : "" ,
"deterministicPassword" : true ,
"torOnly" : false
} ,
{
"id" : "elements" ,
"category" : "Wallet Servers" ,
"name" : "Elements Core" ,
"version" : "v0.21.0.2" ,
"tagline" : "Liquid Network full node" ,
"description" : "Elements is an open source full node implementation to run the Liquid Network, a Bitcoin layer-2 solution enabling the fast, confidential settlement and issuance of digital assets, such as stablecoins, security tokens, and other financial instruments, on top of the Bitcoin timechain." ,
"developer" : "Elements Core Developers" ,
"website" : "https://elementsproject.org" ,
"dependencies" : [
"bitcoind"
] ,
"repo" : "https://github.com/ElementsProject/elements" ,
"support" : "https://t.me/liquid_community" ,
"port" : 3042 ,
"gallery" : [
"1.jpg" ,
"2.jpg" ,
"3.jpg"
] ,
"path" : "" ,
"deterministicPassword" : false ,
"torOnly" : false
}
]
@ -125,6 +125,8 @@ compose() {
local whirlpool_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-whirlpool/hostname"
local squeaknode_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname"
local suredbits_wallet_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/hostname"
local elements_rpc_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-rpc/hostname"
local elements_p2p_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-p2p/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")
@ -133,6 +135,8 @@ compose() {
export SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY")
export SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export SUREDBITS_WALLET_P2P_HIDDEN_SERVICE="$(cat "${suredbits_wallet_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export ELEMENTS_RPC_HIDDEN_SERVICE="$(cat "${elements_rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
export ELEMENTS_P2P_HIDDEN_SERVICE="$(cat "${elements_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
docker-compose \
--env-file "${env_file}" \
@ -262,6 +262,11 @@ APP_AGORA_SERVER_IP="10.21.21.88"
APP_AGORA_FILEBROWSER_IP="10.21.21.89"
APP_SPARKKIOSK_IP="10.21.21.90"
APP_SPARKKIOSK_PORT="21214"
APP_ELEMENTS_PORT="3042"
APP_ELEMENTS_IP="10.21.21.91"
APP_ELEMENTS_NODE_IP="10.21.21.92"
APP_ELEMENTS_NODE_RPC_PORT="7041"
APP_ELEMENTS_NODE_P2P_PORT="18332"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -524,6 +529,11 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-agora-filebrowser-ip>/${APP_AGORA_FILEBROWSER_IP}/g" "${template}"
sed -i "s/<app-sparkkiosk-ip>/${APP_SPARKKIOSK_IP}/g" "${template}"
sed -i "s/<app-sparkkiosk-port>/${APP_SPARKKIOSK_PORT}/g" "${template}"
sed -i "s/<app-elements-port>/${APP_ELEMENTS_PORT}/g" "${template}"
sed -i "s/<app-elements-ip>/${APP_ELEMENTS_IP}/g" "${template}"
sed -i "s/<app-elements-node-ip>/${APP_ELEMENTS_NODE_IP}/g" "${template}"
sed -i "s/<app-elements-node-rpc-port>/${APP_ELEMENTS_NODE_RPC_PORT}/g" "${template}"
sed -i "s/<app-elements-node-p2p-port>/${APP_ELEMENTS_NODE_P2P_PORT}/g" "${template}"
done
##########################################################
@ -159,4 +159,9 @@ APP_AGORA_PORT=<app-agora-port>
APP_AGORA_SERVER_IP=<app-agora-server-ip>
APP_AGORA_FILEBROWSER_IP=<app-agora-filebrowser-ip>
APP_SPARKKIOSK_IP=<app-sparkkiosk-ip>
APP_SPARKKIOSK_PORT=<app-sparkkiosk-port>
APP_SPARKKIOSK_PORT=<app-sparkkiosk-port>
APP_ELEMENTS_PORT=<app-elements-port>
APP_ELEMENTS_IP=<app-elements-ip>
APP_ELEMENTS_NODE_IP=<app-elements-node-ip>
APP_ELEMENTS_NODE_RPC_PORT=<app-elements-node-rpc-port>
APP_ELEMENTS_NODE_P2P_PORT=<app-elements-node-p2p-port>
@ -232,4 +232,16 @@ HiddenServicePort 80 <app-agora-ip>:80
# sparkkiosk Hidden Service
HiddenServiceDir /data/app-sparkkiosk
HiddenServicePort 80 <app-sparkkiosk-ip>:21214
HiddenServicePort 80 <app-sparkkiosk-ip>:21214
# elements Hidden Service
HiddenServiceDir /data/app-elements
HiddenServicePort 80 <app-elements-ip>:8080
# elements rpc Hidden Service
HiddenServiceDir /data/app-elements-rpc
HiddenServicePort <app-elements-node-rpc-port> <app-elements-node-ip>:<app-elements-node-rpc-port>
# elements p2p Hidden Service
HiddenServiceDir /data/app-elements-p2p
HiddenServicePort <app-elements-node-p2p-port> <app-elements-node-ip>:<app-elements-node-p2p-port>