Test entrypoint

This commit is contained in:
koalasat 2024-07-18 01:33:47 +02:00
parent c597cc8129
commit c1e9da5c6f
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157
5 changed files with 41 additions and 2 deletions

View File

@ -227,12 +227,13 @@ services:
- ./node/db:/var/lib/postgresql/data
strfry:
image: dockurr/strfry:0.9.6
build: ./docker/strfry
command: /app/strfry.sh
container_name: strfry-dev
restart: unless-stopped
volumes:
- ./node/strfry/db:/app/strfry-db
- ./docker/strfry/config/strfry.conf:/etc/strfry.conf:r
- ./docker/strfry:/etc/strfry
network_mode: service:tor
# # Postgresql for CLN

11
docker/strfry/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM dockurr/strfry:0.9.6
USER root
RUN apk add --no-cache dcron
RUN crontab -u root /etc/crontab
ENTRYPOINT ["/etc/entrypoint.sh"]
CMD ["$@"]

24
docker/strfry/crontab Normal file
View File

@ -0,0 +1,24 @@
# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').
#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# 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'

3
docker/strfry/entrypoint.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
crond -f -l 8