executable sync

This commit is contained in:
koalasat
2024-07-24 19:21:35 +02:00
parent 2bc9e66c34
commit 3695d0956e
9 changed files with 19 additions and 19 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,4 @@
testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion
wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion

View File

@ -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

7
compose/strfry/sync.sh Normal file
View File

@ -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

View File

@ -0,0 +1,4 @@
testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion
wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion

View File

@ -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