summaryrefslogtreecommitdiffhomepage
path: root/public/v4/apps/offen-local-docker-backup.yml
blob: a3e8581ce90af89f7e3c57940bb30f2a18a7dd50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
captainVersion: 4
services:
    $$cap_appname:
        image: offen/docker-volume-backup:$$cap_version
        environment:
            BACKUP_FILENAME: $$cap_backup_filename
            BACKUP_ARCHIVE: /archive
            BACKUP_CRON_EXPRESSION: $$cap_backup_cron_expression
            BACKUP_RETENTION_DAYS: $$cap_backup_retention_days
        volumes:
            - $$cap_volume_to_backup:/backup/data
            - $$cap_backup_path:/archive
        restart: always
        caproverExtra:
            notExposeAsWebApp: 'true'
caproverOneClickApp:
    variables:
        - id: $$cap_version
          label: Docker volume backup version
          defaultValue: 'v2'
          description: Check out their Docker page for the valid tags https://hub.docker.com/r/offen/docker-volume-backup/tags
          validRegex: /^([^\s^\/])+$/
        - id: $$cap_volume_to_backup
          label: Volume to backup
          description: Path of the volume that you want to backup, e.g. `/var/lib/docker/volumes/captain--my-app/_data`
        - id: $$cap_backup_path
          label: Backup path
          defaultValue: '/backups'
          description: Path where you want to store the backups
        - id: $$cap_backup_filename
          label: Backup filename
          defaultValue: 'backup-%Y-%m-%dT%H-%M-%S.tar.gz'
          description: The name of the backup file including the `.tar.gz` extension. Format verbs will be replaced as in `strftime`. Omitting them will result in the same filename for every backup run, which means previous versions will be overwritten on subsequent runs. The default results in filenames like `backup-2021-08-29T04-00-00.tar.gz`.
        - id: $$cap_backup_cron_expression
          label: Cron expression
          defaultValue: '@daily'
          description: Backups run on the given cron schedule in `busybox` flavor. If no value is set, `@daily` will be used. If you do not want the cron to ever run, use `0 0 5 31 2 ?`.
        - id: $$cap_backup_retention_days
          label: Backup retention days
          defaultValue: '14'
          description: Define this value to enable automatic rotation of old backups. The value declares the number of days for which a backup is kept.
    instructions:
        start: >-
            Backup Docker volumes locally. See https://github.com/offen/docker-volume-backup.
        end: >-
            Aaaand you're done! 😄
            Your service is up and running
    displayName: Offen Docker Backup (Local)
    isOfficial: true
    description: Backup Docker volumes locally
    documentation: Taken from https://github.com/offen/docker-volume-backup