From d7f186b0a59081d7fc00e859a1cfa65c7c51dbd1 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 1 Aug 2023 18:29:04 +0700 Subject: [PATCH] Update Nostr Relay to v1.1.0 (#715) Co-authored-by: nmfretz --- nostr-relay/data/relay-proxy/.gitkeep | 0 nostr-relay/docker-compose.yml | 16 +++++++++++++++- nostr-relay/hooks/pre-start | 7 +++++++ nostr-relay/umbrel-app.yml | 20 +++++++++++++------- 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 nostr-relay/data/relay-proxy/.gitkeep create mode 100755 nostr-relay/hooks/pre-start diff --git a/nostr-relay/data/relay-proxy/.gitkeep b/nostr-relay/data/relay-proxy/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/nostr-relay/docker-compose.yml b/nostr-relay/docker-compose.yml index 6221a21..29a43dd 100644 --- a/nostr-relay/docker-compose.yml +++ b/nostr-relay/docker-compose.yml @@ -8,12 +8,14 @@ services: PROXY_AUTH_ADD: "false" web: - image: getumbrel/umbrel-nostr-relay:v0.1.0@sha256:1c3c2b0563e567258a37e75e5c98028dce02503e522d29914b2a34e6d2eb3421 + image: getumbrel/umbrel-nostr-relay:v1.1.0@sha256:21b67ab2e9d30b20e785497f19534e8e21b6da1bfe69e3ae5afe91b759f20488 user: "1000:1000" restart: on-failure environment: RELAY_HOST: "nostr-relay_relay_1" RELAY_PORT: "8080" + RELAY_PROXY_HOST: "nostr-relay_relay-proxy_1" + RELAY_PROXY_PORT: "80" relay: image: getumbrel/nostr-rs-relay:0.8.1@sha256:a6c857aecd4964bf058ec5c3c0fea95e0d87ed0cc789f2140f96de108e5515ec @@ -22,3 +24,15 @@ services: volumes: - ${APP_DATA_DIR}/data/relay/config.toml:/app/config.toml - ${APP_DATA_DIR}/data/relay/db:/app/db + + relay-proxy: + image: getumbrel/umbrel-nostr-relay-proxy:v1.1.0@sha256:c8086f63ac23ade15376fc22aa3cee894a0374c698e7354c2593d395812ff715 + user: "1000:1000" + restart: on-failure + environment: + RELAY_HOST: "nostr-relay_relay_1" + RELAY_PORT: "8080" + volumes: + - ${APP_DATA_DIR}/data/relay-proxy:/app/data + depends_on: + - relay diff --git a/nostr-relay/hooks/pre-start b/nostr-relay/hooks/pre-start new file mode 100755 index 0000000..4ea7e35 --- /dev/null +++ b/nostr-relay/hooks/pre-start @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail + +APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)/data" +RELAY_PROXY_DATA_DIR="${APP_DATA_DIR}/relay-proxy" + +[ ! -d "${RELAY_PROXY_DATA_DIR}" ] && mkdir -p "${RELAY_PROXY_DATA_DIR}" && chown 1000:1000 "${RELAY_PROXY_DATA_DIR}" diff --git a/nostr-relay/umbrel-app.yml b/nostr-relay/umbrel-app.yml index 31b1edd..109e653 100644 --- a/nostr-relay/umbrel-app.yml +++ b/nostr-relay/umbrel-app.yml @@ -2,23 +2,29 @@ manifestVersion: 1 id: nostr-relay category: social name: Nostr Relay -version: "1.0.0" +version: "1.1.0" tagline: Backup all your Nostr activity with your private relay description: > Introducing Nostr Relay — an official app by Umbrel. - Connect your Nostr clients, such as Damus, Astral, and Amethyst, to your private relay for seamless backup of all your activity on Nostr. This ensures that your activity is not lost even if you are censored or blocked by public relays. - - - In Damus, go to Settings > Relays to add your Relay URL. + Step 1. Connect your Nostr client (e.g., Damus, Amethyst) to your private relay for seamless backup of all Nostr activity. In Damus, add your Relay URL via Menu > Relays. Tip: Install Tailscale on your Umbrel and your devices for an uninterrupted connection between your clients and your relay, even when you're away from your home network. Enable Tailscale's MagicDNS and use ws://umbrel:4848 as your Relay URL. + Step 2. Tap the globe icon on the top to back up past Nostr activity from your public relays and ensure uninterrupted future backups, even if the connection between your private relay and Nostr client is disrupted. + + + That's it! Your past and future Nostr activity will be now backed up to your private relay. + + Nostr Relay is powered by the open source nostr-rs-relay project — a Rust implementation of Nostr relay. It currently supports the entire relay protocol, including NIP-01, NIP-02, NIP-03, NIP-05, NIP-09, NIP-11, NIP-12, NIP-15, NIP-16, NIP-20, NIP-22, NIP-26, NIP-28, and NIP-33. -releaseNotes: "" +releaseNotes: >- + This update brings a brand new feature that allows you to sync your private relay with your public relays, + backing up your past and future Nostr activity, even if the connection between your client and your private + relay is lost. Just tap the globe icon, enter your NIP-05 or npub address, and that's it! developer: Umbrel website: https://umbrel.com dependencies: [] @@ -33,4 +39,4 @@ path: "" deterministicPassword: false torOnly: false submitter: Umbrel -submission: https://github.com/getumbrel/umbrel-apps/pull/398 \ No newline at end of file +submission: https://github.com/getumbrel/umbrel-apps/pull/398