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:
commit
5adea1cbb4
1 changed files with 3 additions and 4 deletions
|
|
@ -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
|
|
||||||
Loading…
Reference in a new issue