diff --git a/compose/docker-compose.yml b/compose/docker-compose.yml index 0b2e05e..08e1074 100644 --- a/compose/docker-compose.yml +++ b/compose/docker-compose.yml @@ -148,7 +148,7 @@ services: container_name: strfry${SUFFIX} restart: always volumes: - - ${STRFRY_SYNC}:/app/sync.sh:ro + - ${STRFRY_URLS}:/app/onion_urls.txt:ro - ${STRFRY_CONF}:/etc/strfry.conf:ro - ${STRFRY_DATA}/db:/app/strfry-db:rw network_mode: service:tor diff --git a/compose/env-sample/lndtn/compose.env b/compose/env-sample/lndtn/compose.env index aa22388..802227b 100644 --- a/compose/env-sample/lndtn/compose.env +++ b/compose/env-sample/lndtn/compose.env @@ -29,7 +29,7 @@ NGINX_CONFD='./nginx/tn.conf.d' WELLKNOWN='./nginx/tn.well-known' STRFRY_CONF='./env-sample/lndtn/strfry.conf' -STRFRY_SYNC='./strfry/tn.sync.sh' +STRFRY_URLS='./strfry/tn.onion_urls.txt' STRFRY_DATA='/custom_path/testnet/strfry' # Port and number of HTTP server workers for the robosats backend diff --git a/compose/strfry/Dockerfile b/compose/strfry/Dockerfile index 578d0f5..dd0612a 100644 --- a/compose/strfry/Dockerfile +++ b/compose/strfry/Dockerfile @@ -9,6 +9,7 @@ RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf COPY crontab /tmp/crontab RUN cat /tmp/crontab > /etc/crontabs/root +COPY sync.sh /etc/strfry/sync.sh COPY entrypoint.sh /etc/strfry/entrypoint.sh RUN chmod +x /etc/strfry/entrypoint.sh diff --git a/compose/strfry/crontab b/compose/strfry/crontab index ec45be6..71a96d9 100644 --- a/compose/strfry/crontab +++ b/compose/strfry/crontab @@ -21,4 +21,4 @@ # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command -*/1 * * * * torsocks /app/sync.sh +*/1 * * * * torsocks /etc/strfry/sync.sh diff --git a/compose/strfry/mn.onion_urls.txt b/compose/strfry/mn.onion_urls.txt new file mode 100644 index 0000000..2c81ddc --- /dev/null +++ b/compose/strfry/mn.onion_urls.txt @@ -0,0 +1,4 @@ +testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion +jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion +ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion +wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file diff --git a/compose/strfry/mn.sync.sh b/compose/strfry/mn.sync.sh deleted file mode 100644 index 2828f5c..0000000 --- a/compose/strfry/mn.sync.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -filters='{"kinds":[38383]}' - -/app/strfry --config /etc/strfry.conf sync ws://ngdk7ocdzmz5kzsysa3om6du7ycj2evxp2f2olfkyq37htx3gllwp2yd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://satstraoq35jffvkgpfoqld32nzw2siuvowanruindbfojowpwsjdgad.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://4t4jxmivv6uqej6xzx2jx3fxh75gtt65v3szjoqmc4ugdlhipzdat6yd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://mmhaqzuirth5rx7gl24d4773lknltjhik57k7ahec5iefktezv4b3uid.onion/nostr --filter "$filters" --dir both diff --git a/compose/strfry/sync.sh b/compose/strfry/sync.sh new file mode 100644 index 0000000..338fb53 --- /dev/null +++ b/compose/strfry/sync.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +filters='{"kinds":[38383]}' + +while IFS= read -r line; do + /app/strfry --config /etc/strfry.conf sync ws://${line}/nostr --filter "$filters" --dir both +done < /app/onion_urls.txt diff --git a/compose/strfry/tn.onion_urls.txt b/compose/strfry/tn.onion_urls.txt new file mode 100644 index 0000000..2c81ddc --- /dev/null +++ b/compose/strfry/tn.onion_urls.txt @@ -0,0 +1,4 @@ +testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion +jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion +ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion +wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion \ No newline at end of file diff --git a/compose/strfry/tn.sync.sh b/compose/strfry/tn.sync.sh deleted file mode 100644 index d79feb2..0000000 --- a/compose/strfry/tn.sync.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -filters='{"kinds":[38383]}' - -/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both -/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both