Merge pull request #182 from benyafai/main

Override the entrypoint so we can add a sleep delay before the next run.
This commit is contained in:
Michael 2024-10-04 07:16:44 +01:00 committed by GitHub
commit 5adea1cbb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
@ -14,6 +15,4 @@ services:
replicas: 1 replicas: 1
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