kind: pipeline type: docker name: backup-multiple-configs steps: - name: backup-homebox image: alpine commands: - apk add --no-cache p7zip tar - tar cvf - /backup/homebox | 7z a -si -p"$ENCRYPTION_KEY" -mhe=on /backup/homebox_backup.7z volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-vaultwarden image: alpine commands: - apk add --no-cache p7zip tar - tar cvf - /backup/vaultwarden | 7z a -si -p"$ENCRYPTION_KEY" -mhe=on /backup/vaultwarden_backup.7z volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-koillection image: alpine commands: - apk add --no-cache p7zip tar - tar cvf - /backup/koillection | 7z a -si -p"$ENCRYPTION_KEY" -mhe=on /backup/koillection_backup.7z volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-Homepage image: alpine commands: - apk add --no-cache p7zip tar - tar cvf - /backup/Homepage | 7z a -si -p"$ENCRYPTION_KEY" -mhe=on /backup/Homepage_backup.7z volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-mealie image: alpine commands: - apk add --no-cache p7zip tar - tar cvf - /backup/mealie | 7z a -si -p"$ENCRYPTION_KEY" -mhe=on /backup/mealie_backup.7z volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: upload-to-s3 image: amazon/aws-cli commands: - | find /backup -type f -name "*.7z" -exec sh -c 'aws s3 cp "$1" "s3://ronnic-backup/backup/$(basename $1)"' _ {} \; environment: AWS_ACCESS_KEY_ID: from_secret: aws_access_key_id AWS_SECRET_ACCESS_KEY: from_secret: aws_secret_access_key AWS_DEFAULT_REGION: from_secret: aws_default_region volumes: - name: config_volumes path: /backup - name: cleanup image: alpine commands: - rm -f /backup/*.7z volumes: - name: config_volumes path: /backup volumes: - name: config_volumes host: path: /home/ronnic/Configs