diff --git a/docker-compose.yml b/docker-compose.yml index 472fc72c..bd70fa70 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -228,12 +228,12 @@ services: strfry: build: ./docker/strfry - command: /app/strfry.sh container_name: strfry-dev restart: unless-stopped volumes: + - ./docker/strfry/strfry.conf:/app/strfry.conf - ./node/strfry/db:/app/strfry-db - - ./docker/strfry:/etc/strfry + - ./node/strfry/log/:/var/log/ network_mode: service:tor # # Postgresql for CLN diff --git a/docker/strfry/Dockerfile b/docker/strfry/Dockerfile index eb0bb4a2..159b6e70 100644 --- a/docker/strfry/Dockerfile +++ b/docker/strfry/Dockerfile @@ -1,11 +1,11 @@ FROM dockurr/strfry:0.9.6 -USER root +RUN apk add --no-cache dcron curl iproute2 -RUN apk add --no-cache dcron +ADD . /app -RUN crontab -u root /etc/crontab +COPY entrypoint.sh /etc/strfry/entrypoint.sh -ENTRYPOINT ["/etc/entrypoint.sh"] +RUN chmod +x /etc/strfry/entrypoint.sh -CMD ["$@"] \ No newline at end of file +ENTRYPOINT ["/etc/strfry/entrypoint.sh"] diff --git a/docker/strfry/crontab b/docker/strfry/crontab index ea94fd2a..2c38b4c7 100644 --- a/docker/strfry/crontab +++ b/docker/strfry/crontab @@ -21,4 +21,4 @@ # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command -*/1 * * * * bash '/app/strfry sync wss://nostr.satstralia.com --dir both >> /var/log/cron.log 2>&1' \ No newline at end of file +*/1 * * * * /app/strfry --config /app/strfry.conf sync wss://nostr.satstralia.com --dir both >> /var/log/cron.log 2>&1 diff --git a/docker/strfry/entrypoint.sh b/docker/strfry/entrypoint.sh index 5ea34c77..724e755d 100755 --- a/docker/strfry/entrypoint.sh +++ b/docker/strfry/entrypoint.sh @@ -1,3 +1,5 @@ #!/bin/sh -crond -f -l 8 \ No newline at end of file +crontab /app/crontab + +crond -f -l 8 & /app/strfry.sh \ No newline at end of file diff --git a/docker/strfry/strfry.conf b/docker/strfry/strfry.conf index fea0d885..01fb191a 100644 --- a/docker/strfry/strfry.conf +++ b/docker/strfry/strfry.conf @@ -3,7 +3,7 @@ ## # Directory that contains the strfry LMDB database (restart required) -db = "./strfry-db/" +db = "/app/strfry-db/" dbParams { # Maximum number of threads/processes that can simultaneously have LMDB transactions open (restart required)