kind: pipeline type: docker name: backup-multiple-configs steps: - name: backup-homebox image: alpine commands: - apk add --no-cache openssl tar - tar cvf - /backup/homebox | openssl enc -aes-256-cbc -salt -out /backup/homebox_backup.tar.enc -k "$ENCRYPTION_KEY" -md sha256 volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-vaultwarden image: alpine commands: - apk add --no-cache openssl tar - tar cvf - /backup/vaultwarden | openssl enc -aes-256-cbc -salt -out /backup/vaultwarden_backup.tar.enc -k "$ENCRYPTION_KEY" -md sha256 volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-koillection image: alpine commands: - apk add --no-cache openssl tar - tar cvf - /backup/koillection | openssl enc -aes-256-cbc -salt -out /backup/koillection_backup.tar.enc -k "$ENCRYPTION_KEY" -md sha256 volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-Homepage image: alpine commands: - apk add --no-cache openssl tar - tar cvf - /backup/Homepage | openssl enc -aes-256-cbc -salt -out /backup/Homepage_backup.tar.enc -k "$ENCRYPTION_KEY" -md sha256 volumes: - name: config_volumes path: /backup environment: ENCRYPTION_KEY: from_secret: encryption_key - name: backup-mealie image: alpine commands: - apk add --no-cache openssl tar - tar cvf - /backup/mealie | openssl enc -aes-256-cbc -salt -out /backup/mealie_backup.tar.enc -k "$ENCRYPTION_KEY" -md sha256 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 "*.tar.enc" -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 volumes: - name: config_volumes host: path: /home/ronnic/Configs