From 20b4c36b33326a72d314cd90b41b5dc26442e8d5 Mon Sep 17 00:00:00 2001 From: rorp Date: Fri, 8 Oct 2021 03:48:58 -0700 Subject: [PATCH] Add krystal-bull app (#984) Co-authored-by: Luke Childs --- apps/krystal-bull/data/oracleserver/.gitkeep | 0 apps/krystal-bull/docker-compose.yml | 29 ++++++++++++++++++++ apps/registry.json | 21 ++++++++++++++ scripts/configure | 8 +++++- templates/.env-sample | 5 +++- templates/torrc-apps-3-sample | 6 +++- 6 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 apps/krystal-bull/data/oracleserver/.gitkeep create mode 100644 apps/krystal-bull/docker-compose.yml diff --git a/apps/krystal-bull/data/oracleserver/.gitkeep b/apps/krystal-bull/data/oracleserver/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/krystal-bull/docker-compose.yml b/apps/krystal-bull/docker-compose.yml new file mode 100644 index 0000000..c5b5b62 --- /dev/null +++ b/apps/krystal-bull/docker-compose.yml @@ -0,0 +1,29 @@ +version: "3.7" + +services: + web: + image: bitcoinscala/oracle-server-ui:0.0.1-864a9f4a-SNAPSHOT + user: "1000:1000" + restart: on-failure + stop_grace_period: 1m + environment: + ORACLE_SERVER_API_URL: "http://${APP_KRYSTAL_BULL_SERVER_IP}:9998/" + TOR_PROXY: socks5://${TOR_PROXY_IP}:${TOR_PROXY_PORT} + ports: + - "${APP_KRYSTAL_BULL_PORT}:3001" + networks: + default: + ipv4_address: $APP_KRYSTAL_BULL_IP + depends_on: + - oracleserver + oracleserver: + image: bitcoinscala/bitcoin-s-oracle-server:1.7.0-212-d9126650-SNAPSHOT + user: "1000:1000" + restart: on-failure + volumes: + - ${APP_DATA_DIR}/data/oracleserver:/home/bitcoin-s/.bitcoin-s + environment: + BITCOIN_S_KEYMANAGER_ENTROPY: $APP_SEED + networks: + default: + ipv4_address: $APP_KRYSTAL_BULL_SERVER_IP \ No newline at end of file diff --git a/apps/registry.json b/apps/registry.json index a1163cc..bd3a2a7 100644 --- a/apps/registry.json +++ b/apps/registry.json @@ -525,5 +525,26 @@ ], "path": "/login?user=umbrel", "defaultPassword": "moneyprintergobrrr" + }, + { + "id": "krystal-bull", + "category": "Social", + "name": "Krystal Bull", + "version": "1.7.0-212-d9126650", + "tagline": "Become an oracle and create Bitcoin bets", + "description": "Krystal Bull allows you to become a Bitcoin oracle. An oracle allows information from the real world (financial markets, sporting events, elections, etc) to be used to create and settle Bitcoin bets.\n\nThe oracle is a crucial component for Discreet Log Contracts (DLC). Without a trustworthy oracle, you cannot create a bet on Bitcoin using DLCs. Trustworthy oracles are a building block to realizing Bitcoin DeFi.\n\nTo see some example oracles, please visit oracle.suredbits.com.\n\nWARNING: This version of Krystal Bull is an early alpha release for testing. It's not secure, please don't use it for anything serious.", + "developer": "SuredBits", + "website": "https://suredbits.com/", + "dependencies": [], + "repo": "https://github.com/bitcoin-s/krystal-bull", + "support": "https://join.slack.com/t/suredbits/shared_invite/zt-eavycu0x-WQL7XOakzQo8tAy7jHHZUw", + "port": 3010, + "gallery": [ + "1.jpg", + "2.jpg", + "3.jpg" + ], + "path": "", + "defaultPassword": "" } ] diff --git a/scripts/configure b/scripts/configure index 74b378d..3f1a890 100755 --- a/scripts/configure +++ b/scripts/configure @@ -202,7 +202,10 @@ APP_SQUEAKNODE_PORT="12994" APP_SQUEAKNODE_GRPC_PORT="8994" APP_SQUEAKNODE_P2P_PORT="8555" APP_SQUEAKNODE_P2P_TESTNET_PORT="18555" -APP_NODE_RED_IP="10.21.21.57" +APP_KRYSTAL_BULL_IP="10.21.21.56" +APP_KRYSTAL_BULL_PORT="3010" +APP_KRYSTAL_BULL_SERVER_IP="10.21.21.57" +APP_NODE_RED_IP="10.21.21.55" APP_NODE_RED_PORT="1880" # Generate RPC credentials @@ -403,6 +406,9 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " 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_KRYSTAL_BULL_IP}/g" "${template}" + sed -i "s//${APP_KRYSTAL_BULL_PORT}/g" "${template}" + sed -i "s//${APP_KRYSTAL_BULL_SERVER_IP}/g" "${template}" sed -i "s//${APP_NODE_RED_IP}/g" "${template}" sed -i "s//${APP_NODE_RED_PORT}/g" "${template}" done diff --git a/templates/.env-sample b/templates/.env-sample index 3a024ad..934245e 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -96,5 +96,8 @@ APP_SQUEAKNODE_PORT= APP_SQUEAKNODE_GRPC_PORT= APP_SQUEAKNODE_P2P_PORT= APP_SQUEAKNODE_P2P_TESTNET_PORT= +APP_KRYSTAL_BULL_IP= +APP_KRYSTAL_BULL_PORT= +APP_KRYSTAL_BULL_SERVER_IP= APP_NODE_RED_IP= -APP_NODE_RED_PORT= \ No newline at end of file +APP_NODE_RED_PORT= diff --git a/templates/torrc-apps-3-sample b/templates/torrc-apps-3-sample index aa7fc65..a576575 100644 --- a/templates/torrc-apps-3-sample +++ b/templates/torrc-apps-3-sample @@ -21,6 +21,10 @@ HiddenServiceDir /var/lib/tor/app-squeaknode-p2p HiddenServicePort : HiddenServicePort : +# krystal-bull Hidden Service +HiddenServiceDir /var/lib/tor/app-krystal-bull +HiddenServicePort 80 :3001 + # node-red Hidden Service HiddenServiceDir /var/lib/tor/app-node-red -HiddenServicePort 80 : \ No newline at end of file +HiddenServicePort 80 :