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 restart: unless-stopped
volumes: volumes:
- ./docker/strfry/strfry.conf:/etc/strfry.conf:ro - ./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 - ./node/strfry/db:/app/strfry-db:rw
network_mode: service:tor network_mode: service:tor

View File

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

View File

@ -9,6 +9,7 @@ RUN echo "TorPort 9050" >> /etc/tor/torsocks.conf
COPY crontab /tmp/crontab COPY crontab /tmp/crontab
RUN cat /tmp/crontab > /etc/crontabs/root RUN cat /tmp/crontab > /etc/crontabs/root
COPY sync.sh /etc/strfry/sync.sh
COPY entrypoint.sh /etc/strfry/entrypoint.sh COPY entrypoint.sh /etc/strfry/entrypoint.sh
RUN chmod +x /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) # For more information see the manual pages of crontab(5) and cron(8)
# #
# m h dom mon dow command # 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]}' filters='{"kinds":[38383]}'
/app/strfry --config /etc/strfry.conf sync ws://testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion/nostr --filter "$filters" --dir both while IFS= read -r line; do
/app/strfry --config /etc/strfry.conf sync ws://jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion/nostr --filter "$filters" --dir both /app/strfry --config /etc/strfry.conf sync ws://${line}/nostr --filter "$filters" --dir both
/app/strfry --config /etc/strfry.conf sync ws://ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion/nostr --filter "$filters" --dir both done < /app/onion_urls.txt
/app/strfry --config /etc/strfry.conf sync ws://wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion/nostr --filter "$filters" --dir both