feat: add support for relay list from json file

This commit adds the ability to specify relay lists in a json file for both import and blastr settings. This provides more flexibility in configuring the application. It also includes error handling for reading and parsing the json file.
This commit is contained in:
fsociety
2024-09-23 21:10:47 +02:00
parent 11401b7a75
commit c19cebe537
4 changed files with 97 additions and 2 deletions

View File

@@ -32,6 +32,7 @@ INBOX_PULL_INTERVAL_SECONDS=600
IMPORT_START_DATE="2023-01-20"
IMPORT_QUERY_INTERVAL_SECONDS=600
IMPORT_SEED_RELAYS="relay.damus.io,nos.lol,relay.nostr.band,relay.snort.social,nostr.land,nostr.mom,relay.nos.social,relay.primal.net,relay.nostr.bg,no.str.cr,nostr21.com,nostrue.com,relay.siamstr.com,wot.utxo.one,nostrelites.org,wot.nostr.party,wot.sovbit.host,wot.girino.org,relay.lnau.net,wot.siamstr.com,wot.sudocarlos.com,relay.otherstuff.fyi,relay.lexingtonbitcoin.org,wot.azzamo.net,wot.swarmstr.com,zap.watch,satsage.xyz,wons.calva.dev"
IMPORT_SEED_RELAYS_FILE="" # If you want to use a json file, set this to the path of the file (e.g. "relays_import.json")
## Backup Settings
BACKUP_PROVIDER="aws"
@@ -45,6 +46,7 @@ AWS_BUCKET_NAME="utxo-relay-backups"
## Blastr Settings
BLASTR_RELAYS="relay.damus.io,nos.lol,relay.nostr.band,relay.snort.social,nostr.land,nostr.mom,relay.nos.social,relay.primal.net,relay.nostr.bg,no.str.cr,nostr21.com,nostrue.com,relay.siamstr.com,wot.utxo.one,nostrelites.org,wot.nostr.party,wot.sovbit.host,wot.girino.org,relay.lnau.net,wot.siamstr.com,wot.sudocarlos.com,relay.otherstuff.fyi,relay.lexingtonbitcoin.org,wot.azzamo.net,wot.swarmstr.com,zap.watch,satsage.xyz,wons.calva.dev"
BLASTR_RELAYS_FILE="" # If you want to use a json file, set this to the path of the file (e.g. "relays_blastr.json")
## OPTIONAL: Docker UID and GID - should be the same as the user running the docker container
DOCKER_UID=1000