executable sync

This commit is contained in:
koalasat 2024-07-24 19:20:13 +02:00
parent 507082d865
commit e3e530c08b
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
6 changed files with 16 additions and 11 deletions

View File

@ -232,7 +232,7 @@ services:
restart: unless-stopped
volumes:
- ./docker/strfry/strfry.conf:/etc/strfry.conf:ro
- ./docker/strfry/sync.sh:/app/sync.sh:ro
- ./docker/strfry/onion_urls.txt:/app/onion_urls.txt:ro
- ./node/strfry/db:/app/strfry-db:rw
network_mode: service:tor

View File

@ -207,13 +207,14 @@ services:
# network_mode: service:bitcoind
strfry:
image: dockurr/strfry:0.9.6
container_name: test-strfry
build: ./docker/strfry
container_name: strfry-dev
restart: unless-stopped
volumes:
- ./tests/strfry/db:/app/strfry-db
- ./tests/strfry/config/strfry.conf:/etc/strfry.conf:r
network_mode: service:bitcoind
- ./test/strfry/strfry.conf:/etc/strfry.conf:ro
- ./test/strfry/onion_urls.txt:/etc/strfry/onion_urls.txt:ro
- ./test/strfry/db:/app/strfry-db:rw
network_mode: service:tor
volumes:
redisdata:

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

@ -2,7 +2,6 @@
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
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