Skip to content

Commit 5d09104

Browse files
authored
Merge pull request #13 from KoalaSat/use-nostr-as-cache-system
executable sync
2 parents 7936bd1 + 3695d09 commit 5d09104

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

compose/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ services:
148148
container_name: strfry${SUFFIX}
149149
restart: always
150150
volumes:
151-
- ${STRFRY_SYNC}:/app/sync.sh:ro
151+
- ${STRFRY_URLS}:/app/onion_urls.txt:ro
152152
- ${STRFRY_CONF}:/etc/strfry.conf:ro
153153
- ${STRFRY_DATA}/db:/app/strfry-db:rw
154154
network_mode: service:tor

compose/env-sample/lndtn/compose.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NGINX_CONFD='./nginx/tn.conf.d'
2929
WELLKNOWN='./nginx/tn.well-known'
3030

3131
STRFRY_CONF='./env-sample/lndtn/strfry.conf'
32-
STRFRY_SYNC='./strfry/tn.sync.sh'
32+
STRFRY_URLS='./strfry/tn.onion_urls.txt'
3333
STRFRY_DATA='/custom_path/testnet/strfry'
3434

3535
# Port and number of HTTP server workers for the robosats backend

compose/strfry/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf
99
COPY crontab /tmp/crontab
1010
RUN cat /tmp/crontab > /etc/crontabs/root
1111

12+
COPY sync.sh /etc/strfry/sync.sh
1213
COPY entrypoint.sh /etc/strfry/entrypoint.sh
1314

1415
RUN chmod +x /etc/strfry/entrypoint.sh

compose/strfry/crontab

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
# For more information see the manual pages of crontab(5) and cron(8)
2222
#
2323
# m h dom mon dow command
24-
*/1 * * * * torsocks /app/sync.sh
24+
*/1 * * * * torsocks /etc/strfry/sync.sh

compose/strfry/mn.onion_urls.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
2+
jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
3+
ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion
4+
wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion

compose/strfry/mn.sync.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

compose/strfry/sync.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
filters='{"kinds":[38383]}'
4+
5+
while IFS= read -r line; do
6+
/app/strfry --config /etc/strfry.conf sync ws://${line}/nostr --filter "$filters" --dir both
7+
done < /app/onion_urls.txt

compose/strfry/tn.onion_urls.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
2+
jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
3+
ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion
4+
wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion

compose/strfry/tn.sync.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)