cleanup; readme; workflow_dispatch does not yet work in gitea, but trigger can be changed for pseudo-manual triggers
All checks were successful
Build container images / build (push) Successful in 58s
All checks were successful
Build container images / build (push) Successful in 58s
This commit is contained in:
parent
3388e809ba
commit
e9144f460d
17
.drone.yml
17
.drone.yml
@ -1,17 +0,0 @@
|
|||||||
# ---
|
|
||||||
# kind: template
|
|
||||||
# load: multiarch-container.yaml
|
|
||||||
# data:
|
|
||||||
# repo: images/rotate-backups
|
|
||||||
# build_args:
|
|
||||||
# - PYTHON_VERSION=3
|
|
||||||
# - ALPINE_VERSION=3.18
|
|
||||||
# - ROTATE_BACKUPS_VERSION=8.1
|
|
||||||
# tags:
|
|
||||||
# - "8.1"
|
|
||||||
# - "8"
|
|
||||||
# platforms:
|
|
||||||
# - os: linux
|
|
||||||
# arch: arm64
|
|
||||||
# - os: linux
|
|
||||||
# arch: amd64
|
|
@ -25,7 +25,7 @@ jobs:
|
|||||||
username: ${{ secrets.REGISTRY_USER }}
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and publish
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
env:
|
env:
|
||||||
# see <https://docs.gitea.com/usage/actions/comparison#dockerbuild-push-actionv4>
|
# see <https://docs.gitea.com/usage/actions/comparison#dockerbuild-push-actionv4>
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
env:
|
env:
|
||||||
# see <https://docs.gitea.com/usage/actions/comparison#dockerbuild-push-actionv4>
|
# see <https://docs.gitea.com/usage/actions/comparison#dockerbuild-push-actionv4>
|
||||||
|
40
readme.md
40
readme.md
@ -2,3 +2,43 @@
|
|||||||
# `rotate-backups` in a container image
|
# `rotate-backups` in a container image
|
||||||
|
|
||||||
<https://rotate-backups.readthedocs.io>
|
<https://rotate-backups.readthedocs.io>
|
||||||
|
|
||||||
|
## Example usage in kubernetes cronjob
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: CronJob
|
||||||
|
metadata:
|
||||||
|
name: mariadb-backup-rotate-cron
|
||||||
|
namespace: mariadb
|
||||||
|
labels:
|
||||||
|
app: mariadb-backup-rotate-cron
|
||||||
|
spec:
|
||||||
|
schedule: "0 4 20 * *" # 20th of each month at 4am
|
||||||
|
jobTemplate:
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mariadb-backup-rotate-cron
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mariadb-backup-rotate-container
|
||||||
|
image: gitea.jbrumond.me/images/rotate-backups:8
|
||||||
|
command: [ "/opt/rotate.sh", "--daily=7", "--weekly=4", "--monthly=12", "--yearly=always" ]
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 500m
|
||||||
|
memory: 1Gi
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 100Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: mariadb-backup-persistent-storage
|
||||||
|
mountPath: /data
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
volumes:
|
||||||
|
- name: mariadb-backup-persistent-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mariadb-backup-pv-claim
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user