diff --git a/apps/registry.json b/apps/registry.json index 3864795..ee3c540 100644 --- a/apps/registry.json +++ b/apps/registry.json @@ -475,5 +475,29 @@ ], "path": "", "defaultPassword": "" + }, + { + "id": "squeaknode", + "category": "Social", + "name": "Squeaknode", + "version": "0.1.152", + "tagline": "Squeaknode is a peer-to-peer status feed", + "description": "The Squeaknode app allows you to create, view, buy, and sell squeaks. A squeak is a single post that can contain up to 280 characters.\n\nThe Squeaknode timeline is ordered by the timestamp/blockhash embedded in each squeak. Each squeak is signed with a digital signature of the private key of the author. Squeaks can be downloaded from any peer to any peer, but they remain locked until the downloader makes a Lightning payment to decrypt the content.", + "developer": "Jonathan Zernik", + "website": "https://github.com/yzernik", + "dependencies": [ + "bitcoind", + "lnd" + ], + "repo": "https://github.com/yzernik/squeaknode", + "support": "https://github.com/yzernik/squeaknode/discussions", + "port": 12994, + "gallery": [ + "1.jpg", + "2.jpg", + "3.jpg" + ], + "path": "/login?user=umbrel", + "defaultPassword": "moneyprintergobrrr" } ] diff --git a/apps/squeaknode/docker-compose.yml b/apps/squeaknode/docker-compose.yml new file mode 100644 index 0000000..5c52926 --- /dev/null +++ b/apps/squeaknode/docker-compose.yml @@ -0,0 +1,44 @@ +version: "3.7" + +services: + web: + image: yzernik/squeaknode:v0.1.152@sha256:9d4859bed472314e88ec8ad76e45b60872db61267d4f1bd52937b8a5107814c8 + restart: on-failure + stop_grace_period: 1m + ports: + - "$APP_SQUEAKNODE_PORT:$APP_SQUEAKNODE_PORT" + - "$APP_SQUEAKNODE_GRPC_PORT:$APP_SQUEAKNODE_GRPC_PORT" + volumes: + - ${APP_DATA_DIR}/sqk:/sqk + - ${LND_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 + + # LND environment variables + SQUEAKNODE_LND_HOST: $LND_IP + SQUEAKNODE_LND_RPC_PORT: $LND_GRPC_PORT + SQUEAKNODE_LND_TLS_CERT_PATH: "/lnd/tls.cert" + SQUEAKNODE_LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + + # App specific environment variables + SQUEAKNODE_WEBADMIN_ENABLED: "true" + SQUEAKNODE_WEBADMIN_USERNAME: "umbrel" + SQUEAKNODE_WEBADMIN_PASSWORD: "moneyprintergobrrr" + + SQUEAKNODE_NODE_NETWORK: "$BITCOIN_NETWORK" + SQUEAKNODE_NODE_SQK_DIR_PATH: "/sqk" + SQUEAKNODE_NODE_MAX_SQUEAKS: 10000 + SQUEAKNODE_NODE_TOR_PROXY_IP: $TOR_PROXY_IP + SQUEAKNODE_NODE_TOR_PROXY_PORT: $TOR_PROXY_PORT + SQUEAKNODE_NODE_EXTERNAL_ADDRESS: $SQUEAKNODE_P2P_HIDDEN_SERVICE + + DEBUG: "squeaknode:*" + networks: + default: + ipv4_address: $APP_SQUEAKNODE_IP diff --git a/apps/squeaknode/sqk/.gitkeep b/apps/squeaknode/sqk/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/scripts/app b/scripts/app index 38faaab..22c8695 100755 --- a/scripts/app +++ b/scripts/app @@ -122,12 +122,14 @@ compose() { # these values will be registered in an apps manifest and generated dynamically. local dojo_hidden_service_file="${UMBREL_ROOT}/tor/data/app-${app}-dojo/hostname" 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" 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") + export SQUEAKNODE_P2P_HIDDEN_SERVICE="$(cat "${squeaknode_p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" docker-compose \ --env-file "${env_file}" \ diff --git a/scripts/configure b/scripts/configure index fe3a79a..e442b8a 100755 --- a/scripts/configure +++ b/scripts/configure @@ -193,6 +193,13 @@ APP_VAULTWARDEN_IP="10.21.21.46" APP_VAULTWARDEN_PORT="8089" APP_CODE_SERVER_IP="10.21.21.53" APP_CODE_SERVER_PORT="8091" +APP_SQUEAKNODE_IP="10.21.21.54" +APP_SQUEAKNODE_PORT="12994" +APP_SQUEAKNODE_GRPC_PORT="8994" +APP_SQUEAKNODE_P2P_PORT="8555" +APP_SQUEAKNODE_P2P_TESTNET_PORT="18555" +APP_SQUEAKNODE_ENVOY_IP="10.21.21.55" +APP_SQUEAKNODE_ENVOY_PORT="15081" # Generate RPC credentials if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then @@ -385,6 +392,13 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " sed -i "s//${APP_VAULTWARDEN_PORT}/g" "${template}" sed -i "s//${APP_CODE_SERVER_IP}/g" "${template}" sed -i "s//${APP_CODE_SERVER_PORT}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_IP}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_PORT}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_GRPC_PORT}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_P2P_PORT}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_P2P_TESTNET_PORT}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_ENVOY_IP}/g" "${template}" + sed -i "s//${APP_SQUEAKNODE_ENVOY_PORT}/g" "${template}" done ########################################################## diff --git a/templates/.env-sample b/templates/.env-sample index b539088..82667e4 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -90,3 +90,10 @@ APP_VAULTWARDEN_IP= APP_VAULTWARDEN_PORT= APP_CODE_SERVER_IP= APP_CODE_SERVER_PORT= +APP_SQUEAKNODE_IP= +APP_SQUEAKNODE_PORT= +APP_SQUEAKNODE_GRPC_PORT= +APP_SQUEAKNODE_P2P_PORT= +APP_SQUEAKNODE_P2P_TESTNET_PORT= +APP_SQUEAKNODE_ENVOY_IP= +APP_SQUEAKNODE_ENVOY_PORT= diff --git a/templates/torrc-apps-2-sample b/templates/torrc-apps-2-sample index 0181cf2..cbb6cb0 100644 --- a/templates/torrc-apps-2-sample +++ b/templates/torrc-apps-2-sample @@ -53,3 +53,13 @@ HiddenServicePort 80 : # code-server Hidden Service HiddenServiceDir /var/lib/tor/app-code-server HiddenServicePort 80 :8080 + +# squeaknode Hidden Service +HiddenServiceDir /var/lib/tor/app-squeaknode +HiddenServicePort 80 : +HiddenServicePort : + +# squeaknode p2p Hidden Service +HiddenServiceDir /var/lib/tor/app-squeaknode-p2p +HiddenServicePort : +HiddenServicePort :