Skip to content

Commit

Permalink
Override the entrypoint so we can add a sleep delay before the next run.
Browse files Browse the repository at this point in the history
  • Loading branch information
benyafai committed Oct 3, 2024
1 parent 091e2af commit 395b273
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ services:
stdin_open: true
tty: true
image: ghcr.io/nanos/fedifetcher:latest
command: "--access-token=<TOKEN> --server=<SERVER>"
# We override the Dockerfile entrypoint, run the python codewith 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
volumes:
- ./data:/app/artifacts
Expand All @@ -14,6 +15,4 @@ services:
replicas: 1
restart_policy:
# The `any` condition means even after successful runs, we'll restart the script
condition: any
# Specify how often the script should run - for example; after 1 hour.
delay: 1h
condition: any

0 comments on commit 395b273

Please sign in to comment.