Skip to content

Commit

Permalink
executable sync
Browse files Browse the repository at this point in the history
  • Loading branch information
KoalaSat committed Aug 7, 2024
1 parent 507082d commit e3e530c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions docker/strfry/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docker/strfry/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions docker/strfry/onion_urls.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testraliar7xkhos2gipv2k65obykofb4jqzl5l4danfryacifi4t7qd.onion
jpp3w5tpxtyg6lifonisdszpriiapszzem4wod2zsdweyfenlsxeoxid.onion
ghbtv7lhoyhomyir4xvxaeyqgx4ylxksia343jaat3njqqlkqpdjqcyd.onion
wsjyhbashc4zrrex6vijpryujggbka5plry2o62dxqoz3pxinblnj4ad.onion
7 changes: 3 additions & 4 deletions docker/strfry/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e3e530c

Please sign in to comment.