Skip to content

Commit

Permalink
Merge pull request #14 from nikdoof/main
Browse files Browse the repository at this point in the history
Update Kubernetes example and README for persistence
  • Loading branch information
nanos authored Mar 23, 2023
2 parents bbc2791 + 5e7fbba commit b1a382c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ This script is also available in a pre-packaged container, [mastodon_get_replies

The same rules for running this as a cron job apply to running the container, don't overlap any executions.

Persistent files are stored in `/app/artifacts` within the container, so you may want to map this to a local folder on your system.

An example Kubernetes CronJob for running the container is included in the [`examples`](https://github.com/nanos/mastodon_get_replies/tree/main/examples) folder.

### Configuration options
Expand Down
28 changes: 27 additions & 1 deletion examples/k8s-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mastodon-get-replies-pvc
spec:
accessModes:
- ReadWriteOnce
volumeMode: Filesystem
resources:
requests:
storage: 100Mi
---
apiVersion: batch/v1
kind: CronJob
metadata:
Expand All @@ -13,11 +25,25 @@ spec:
spec:
template:
spec:
volumes:
- name: artifacts
persistentVolumeClaim:
claimName: mastodon-get-replies-pvc
containers:
- name: mastodon-get-replies
image: ghcr.io/nanos/mastodon_get_replies:latest
args:
- --server=your.server.social
- --access-token=TOKEN
- --home-timeline-length
- "200"
- --reply-interval-in-hours
- "24"
- --max-followings
- "80"
- --max-followers
- "80"
volumeMounts:
- name: artifacts
mountPath: /app/artifacts
restartPolicy: Never

0 comments on commit b1a382c

Please sign in to comment.