From 481b23739f62a4cf8c754925584e4d437c86a6a2 Mon Sep 17 00:00:00 2001 From: jensgertsen Date: Mon, 4 Apr 2022 15:22:56 +0200 Subject: [PATCH] Add sparkkiosk app (#1312) Co-authored-by: Luke Childs --- apps/registry.json | 24 +++++++++++++++++++++++ apps/sparkkiosk/data/.gitkeep | 0 apps/sparkkiosk/docker-compose.yml | 31 ++++++++++++++++++++++++++++++ scripts/configure | 4 ++++ templates/.env-sample | 2 ++ templates/torrc-server-sample | 4 ++++ 6 files changed, 65 insertions(+) create mode 100644 apps/sparkkiosk/data/.gitkeep create mode 100644 apps/sparkkiosk/docker-compose.yml diff --git a/apps/registry.json b/apps/registry.json index 2eef0f4..1190f0d 100644 --- a/apps/registry.json +++ b/apps/registry.json @@ -1040,5 +1040,29 @@ "deterministicPassword": true, "defaultUsername": "umbrel", "torOnly": false + }, + { + "id": "sparkkiosk", + "category": "Finance", + "name": "Sparkkiosk", + "version": "v1.0.0", + "tagline": "Minimal LNURL kiosk", + "description": "Use sparkkiosk to enable lightning payments from printed QR codes in selfservice kiosks / cafés or other places where POS interaction is not needed or an option.\n\nLog into the dashboard, create a new LNURL, set currency and amount and download QR to print. Monitor latest invoices.", + "developer": "Jens Gertsen", + "website": "https://github.com/jensgertsen/sparkkiosk", + "dependencies": [ + "lnd" + ], + "repo": "https://github.com/jensgertsen/sparkkiosk", + "support": "https://github.com/jensgertsen/sparkkiosk/discussions", + "port": 21214, + "gallery": [ + "1.jpg", + "2.jpg", + "3.jpg" + ], + "path": "", + "deterministicPassword": true, + "torOnly": false } ] diff --git a/apps/sparkkiosk/data/.gitkeep b/apps/sparkkiosk/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/apps/sparkkiosk/docker-compose.yml b/apps/sparkkiosk/docker-compose.yml new file mode 100644 index 0000000..bea45e6 --- /dev/null +++ b/apps/sparkkiosk/docker-compose.yml @@ -0,0 +1,31 @@ +version: "3.7" + +services: + web: + image: jensgertsen/sparkkiosk:v1.0.0@sha256:d49500ce9c47d04436e64dae7e336416aa32f83673058154aa8a983e1420008c + user: 1000:1000 + init: true + restart: on-failure + stop_grace_period: 1m + ports: + - $APP_SPARKKIOSK_PORT:21214 + volumes: + - ${APP_DATA_DIR}/data:/data + - ${LND_DATA_DIR}:/lnd:ro + environment: + # Global + + + # LND + LND_GRPC_ENDPOINT: $LND_IP + LND_GRPC_PORT: $LND_GRPC_PORT + LND_GRPC_CERT: "/lnd/tls.cert" + LND_GRPC_MACAROON: "/lnd/data/chain/bitcoin/$BITCOIN_NETWORK/admin.macaroon" + + # App + APP_HIDDEN_SERVICE: http://$APP_HIDDEN_SERVICE + APP_PASSWORD: $APP_PASSWORD + APP_DOMAIN: $APP_DOMAIN + networks: + default: + ipv4_address: $APP_SPARKKIOSK_IP \ No newline at end of file diff --git a/scripts/configure b/scripts/configure index 02b549e..12730d8 100755 --- a/scripts/configure +++ b/scripts/configure @@ -258,6 +258,8 @@ APP_BLESKOMAT_SERVER_IP="10.21.21.85" APP_BLESKOMAT_SERVER_DB_IP="10.21.21.86" APP_AGORA_IP="10.21.21.87" APP_AGORA_PORT="12080" +APP_SPARKKIOSK_IP="10.21.21.88" +APP_SPARKKIOSK_PORT="21214" # Generate RPC credentials if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then @@ -516,6 +518,8 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " sed -i "s//${APP_BLESKOMAT_SERVER_DB_IP}/g" "${template}" sed -i "s//${APP_AGORA_IP}/g" "${template}" sed -i "s//${APP_AGORA_PORT}/g" "${template}" + sed -i "s//${APP_SPARKKIOSK_IP}/g" "${template}" + sed -i "s//${APP_SPARKKIOSK_PORT}/g" "${template}" done ########################################################## diff --git a/templates/.env-sample b/templates/.env-sample index 8e86861..a00a67d 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -156,3 +156,5 @@ APP_BLESKOMAT_SERVER_IP= APP_BLESKOMAT_SERVER_DB_IP= APP_AGORA_IP= APP_AGORA_PORT= +APP_SPARKKIOSK_IP= +APP_SPARKKIOSK_PORT= \ No newline at end of file diff --git a/templates/torrc-server-sample b/templates/torrc-server-sample index 93dbcbf..9ada665 100644 --- a/templates/torrc-server-sample +++ b/templates/torrc-server-sample @@ -229,3 +229,7 @@ HiddenServicePort 80 : # agora Hidden Service HiddenServiceDir /data/app-agora HiddenServicePort 80 :80 + +# sparkkiosk Hidden Service +HiddenServiceDir /data/app-sparkkiosk +HiddenServicePort 80 :21214 \ No newline at end of file