Override the entrypoint so we can add a sleep delay before the next run.

This commit is contained in:
Ben Yafai 2024-10-03 23:07:45 +01:00
parent 091e2afe1e
commit 3b1baf566f
No known key found for this signature in database

View file

@ -4,7 +4,8 @@ services:
stdin_open: true stdin_open: true
tty: true tty: true
image: ghcr.io/nanos/fedifetcher:latest image: ghcr.io/nanos/fedifetcher:latest
command: "--access-token=<TOKEN> --server=<SERVER>" # We override the Dockerfile entrypoint, run the python code with our commands, then append our sleep command.
entrypoint: ["sh", "-c", "python /app/find_posts.py --access-token=<TOKEN> --server=<SERVER>; sleep 3600; "]
# Persist our data # Persist our data
volumes: volumes:
- ./data:/app/artifacts - ./data:/app/artifacts
@ -15,5 +16,3 @@ services:
restart_policy: restart_policy:
# The `any` condition means even after successful runs, we'll restart the script # The `any` condition means even after successful runs, we'll restart the script
condition: any condition: any
# Specify how often the script should run - for example; after 1 hour.
delay: 1h