Backup
++ It looks like this is a + new node, it's important + establish backups. +
++
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..45ce9d45 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.git +.github +build +node_modules diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 00000000..5ee85b5b --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,47 @@ + +name: Create and publish a Docker image + +on: + push: + branches: ['umbrel-works'] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to the Container registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..935ab8ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM node:18 + +WORKDIR /app + +COPY package*.json /app + +RUN npm i + +COPY . /app + +CMD [ "npm", "start" ] diff --git a/Umbrel/docker-compose.yml b/Umbrel/docker-compose.yml new file mode 100644 index 00000000..7c569e5c --- /dev/null +++ b/Umbrel/docker-compose.yml @@ -0,0 +1,22 @@ +version: "3.7" +services: + app_proxy: + environment: + APP_HOST: lightning-pub + APP_PORT: 1776 + + server: + image: ghcr.io/shocknet/lightning.pub:umbrel-works + volumes: + - "${APP_DATA_DIR}/data:/data" + - "${APP_LIGHTNING_NODE_DATA_DIR}:/lnd:ro" + environment: + LN_BACKEND_TYPE: "LND" + LND_ADDRESS: $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT + LND_CERT_PATH: "/lnd/tls.cert" + LND_MACAROON_PATH: "/lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/admin.macaroon" + DATABASE_FILE: "/data/db.sqlite" + METRICS_DATABASE_FILE: "/data/metrics.sqlite" + PORT: 1776 + restart: on-failure + stop_grace_period: 1m diff --git a/Umbrel/umbrel-app.yml b/Umbrel/umbrel-app.yml new file mode 100644 index 00000000..5bb9ee2e --- /dev/null +++ b/Umbrel/umbrel-app.yml @@ -0,0 +1,36 @@ + manifestVersion: 1 +id: lightning-pub +category: finance +name: Lightning.Pub +version: "1.0.0" +tagline: lightning, nostr, accounts, lnurl, web +description: >- +"Pub" is a Nostr-native account system designed +to make running Lightning infrastructure for your friends/family/customers +easier than previously thought possible. + + Being Nostr-native eliminates the complexity of configuring your node like a server by using commodity Nostr relays. +These relays, unlike LNURL proxies, are trustless by nature of Nostr's own encryption spec (NIP44). + + Support for optional services are integrated into Pub for operators seeking backward compatibility with legacy LNURLs and Lightning Addresses. + + By solving the networking and programability hurdles, Pub provides Lightning with a 3rd Layer that enables node-runners and + Uncle Jims to more easily bring their personal network into Bitcoin's permissionless economy. In doing so, Pub runners + can keep the Lightning Network decentralized, with custodial scaling that is free of fiat rails, large banks, + and other forms of high-time-preference shitcoinery. +developer: shocknet +website: https://shock.network +dependencies: + - lightning +repo: https://github.com/shocknet/Lightning.Pub +support: https://github.com/shocknet/Lightning.Pub/discussions +port: 1776 +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +path: "" +defaultUsername: "" +defaultPassword: "" +submitter: shocknet +submission: https://github.com/getumbrel/umbrel/pull/334 \ No newline at end of file diff --git a/src/auth.ts b/src/auth.ts index 8c380592..6d7bf07f 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,3 +1,5 @@ +import express from 'express'; +import path from 'path'; import { ServerOptions } from "../proto/autogenerated/ts/express_server"; import { AdminContext, MetricsContext } from "../proto/autogenerated/ts/types"; import Main from './services/main' diff --git a/static/backup.html b/static/backup.html new file mode 100644 index 00000000..9f09e81e --- /dev/null +++ b/static/backup.html @@ -0,0 +1,100 @@ + + +
+ +
+
+ + It looks like this is a + new node, it's important + establish backups. +
+
+
+ + Who's the Nostr user that owns this node, can recover the backups, and + connect to manage it? +
+
+ strfry.shock.network
npub123abcdefghhhhhhhhhhhhhhh
+
Note: Code contains a one-time pairing secret.
+
+
+ + Let's confirm some things before we start this Pub +
+
+
+ + How do you want to manage Lightning connectivity? +
+
+
+ + Store your seed phrase somewhere safe, you'll need it if something + ever goes wrong with your nodes hard drive. +
+