Skip to content

Commit 5adea1c

Browse files
authored
Merge pull request #182 from benyafai/main
Override the entrypoint so we can add a sleep delay before the next run.
2 parents 091e2af + 3b1baf5 commit 5adea1c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/docker-compose.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ services:
44
stdin_open: true
55
tty: true
66
image: ghcr.io/nanos/fedifetcher:latest
7-
command: "--access-token=<TOKEN> --server=<SERVER>"
7+
# We override the Dockerfile entrypoint, run the python code with our commands, then append our sleep command.
8+
entrypoint: ["sh", "-c", "python /app/find_posts.py --access-token=<TOKEN> --server=<SERVER>; sleep 3600; "]
89
# Persist our data
910
volumes:
1011
- ./data:/app/artifacts
@@ -14,6 +15,4 @@ services:
1415
replicas: 1
1516
restart_policy:
1617
# The `any` condition means even after successful runs, we'll restart the script
17-
condition: any
18-
# Specify how often the script should run - for example; after 1 hour.
19-
delay: 1h
18+
condition: any

0 commit comments

Comments
 (0)