From 4fb7595398a9f857b855f3c72ab5f3a27dd039eb Mon Sep 17 00:00:00 2001 From: AaronDewes Date: Sat, 16 Jul 2022 13:17:16 +0000 Subject: [PATCH] Try dockerizing LNDHub.go --- apps/lndhub/app.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++ apps/lndhub/entry.sh | 6 +++++ 2 files changed, 59 insertions(+) create mode 100644 apps/lndhub/app.yml create mode 100755 apps/lndhub/entry.sh diff --git a/apps/lndhub/app.yml b/apps/lndhub/app.yml new file mode 100644 index 0000000..ae50bfd --- /dev/null +++ b/apps/lndhub/app.yml @@ -0,0 +1,53 @@ +# SPDX-FileCopyrightText: 2022 Citadel and contributors +# +# SPDX-License-Identifier: AGPL-3.0-only + +# yaml-language-server: $schema=../../app-standard-v4.yml + +citadel_version: 4 + +metadata: + category: Wallet Servers + name: LNDHub.go + version: 0.9.0 + tagline: Give access to BlueWallet & Alby for friends + description: >- + Run BlueWallet & Alby in the most private and secure way possible by removing + 3rd parties and connecting it directly to your Citadel's Lightning node. + + + This app automatically manages accounts, so you can easily share your node with friends and family. + developers: + BlueWallet: https://lndhub.io + dependencies: + - lnd + repo: + Public: https://github.com/getAlby/lndhub.go + support: https://t.me/getalby + gallery: + - 1.jpg + - 2.jpg + - 3.jpg + +services: + main: + image: ghcr.io/runcitadel/lndhub.go:main@sha256:ab0eb387a731d0ff067dc04075aebeeda6b967473499f01adcc26d0942d7c0aa + entrypoint: /entry.sh + environment: + DATABASE_URI: postgresql://citadel:freedom@$APP_LNDHUB_POSTGRES_IP:5432/lndhub?sslmode=disable + JWT_SECRET: $APP_SEED + LND_ADDRESS: $LND_IP:$LND_PORT + port: 3000 + user: 1000:1000 + mounts: + lnd: /lnd + data: + entry.sh: /entry.sh + postgres: + image: postgres:14.4-bullseye + user: 1000:1000 + environment: + POSTGRES_USER: citadel + POSTGRES_PASSWORD: freedom + data: + - data/postgres:/var/lib/postgresql/data diff --git a/apps/lndhub/entry.sh b/apps/lndhub/entry.sh new file mode 100755 index 0000000..148b1de --- /dev/null +++ b/apps/lndhub/entry.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +export LND_MACAROON_HEX="$(xxd -p -c 1000 /lnd/chain/bitcoin/mainnet/admin.macaroon)" +export LND_CERT_HEX="$(xxd -p -c 1000 /lnd/tls.cert)" + +/bin/lndhub