diff --git a/README.md b/README.md index 51e5ca7..4a4730c 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,8 @@ Persistent files are stored in `/app/artifacts` within the container, so you may An [example Kubernetes CronJob](./examples/k8s-cronjob.yaml) for running the container is included in the `examples` folder. +An [example Docker Compose Script](./examples/docker-compose.yaml) for running the container periodically is included in the `examples` folder. + ### Configuration options FediFetcher has quite a few configuration options, so here is my quick configuration advice, that should probably work for most people: diff --git a/examples/docker-compose.yaml b/examples/docker-compose.yaml new file mode 100644 index 0000000..9f7abcb --- /dev/null +++ b/examples/docker-compose.yaml @@ -0,0 +1,19 @@ +name: fedifetcher +services: + fedifetcher: + stdin_open: true + tty: true + image: ghcr.io/nanos/fedifetcher:latest + command: "--access-token= --server=" + # Persist our data + volumes: + - ./data:/app/artifacts + # Use the `deploy` option to enable `restart_policy` + deploy: + # Don't go above 1 replica to avoid multiple overlapping executions of the script + 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 \ No newline at end of file