Skip to content

Commit

Permalink
v2.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vbaidak committed Mar 11, 2024
1 parent 1b8645a commit a2b89f1
Show file tree
Hide file tree
Showing 6 changed files with 226 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Docker image

on:
push:
tags:
- '**'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: scalified/docker-volume-backup
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# v2.39.0

[v2.39.0](https://github.com/offen/docker-volume-backup/releases/tag/v2.39.0)

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM offen/docker-volume-backup:v2.39.0

COPY templates /etc/dockervolumebackup/notifications.d

21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# docker-volume-backup
Docker Volume Backup
# Docker Volume Backup

[![Build Status](https://github.com/Scalified/docker-volume-backup/actions/workflows/publish.yml/badge.svg)](https://github.com/Scalified/docker-volume-backup/actions)
[![Docker Pulls](https://img.shields.io/docker/pulls/scalified/docker-volume-backup.svg)](https://hub.docker.com/r/scalified/docker-volume-backup)

## Description

The [offen/docker-volume-backup](https://github.com/offen/docker-volume-backup) repository clone with HTML notification templates

## How-To

See [offen/docker-volume-backup](https://github.com/offen/docker-volume-backup) documentation

## Scalified Links

* [Scalified](https://www.scalified.com)
* [Scalified Official Facebook Page](https://www.facebook.com/scalified)
* <a href="mailto:info@scalified.com?subject=[Docker Volume Backup]: Proposals And Suggestions">Scalified Support</a>

77 changes: 77 additions & 0 deletions templates/01.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{{ define "title_success" -}}
✅ [INFO]: Backup Success: {{ .Config.BackupStopDuringBackupLabel }}
{{- end }}

{{ define "body_success" -}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>✅ [INFO]: Backup Success: {{ .Config.BackupStopDuringBackupLabel }}</title>
</head>
<style type="text/css">
body {
font-family: Consolas, monospace;;
font-size: 12px;
}
table {
border-width: 1px;
border-color: #3A3A3A;
border-style: dotted;
border-collapse: collapse;
}
table th {
border-width: 1px;
padding: 8px;
border-style: dotted;
border-color: #3A3A3A;
background-color: #E8E8E8;
}
table td {
border-width: 1px;
padding: 8px;
border-style: dotted;
border-color: #3A3A3A;
background-color: #ffffff;
}
</style>
<body>
<table>
<tr>
<th colspan="2">INFO</th>
</tr>
<tr>
<td><b>ℹ️ Name</b></td>
<td>{{ .Config.BackupStopDuringBackupLabel }} ({{ .Config.BackupLatestSymlink }})</td>
</tr>
<tr>
<td><b>▶️ Start time</b></td>
<td>{{ .Stats.StartTime | formatTime }}</td>
</tr>
<tr>
<td><b>⏹️ End time</b></td>
<td>{{ .Stats.EndTime | formatTime }}</td>
</tr>
<tr>
<td><b>⌛ Took time</b></td>
<td>{{ .Stats.TookTime }}</td>
</tr>
<tr>
<td><b>🛑 Stopped containers</b></td>
<td>{{ .Stats.Containers.Stopped }}/{{ .Stats.Containers.All }} ({{ .Stats.Containers.StopErrors }} errors)</td>
</tr>
<tr>
<td><b>⚖️ Backup size</b></td>
<td>{{ .Stats.BackupFile.Size | formatBytesBin }} / {{ .Stats.BackupFile.Size | formatBytesDec }}</td>
</tr>
<tr>
<td><b>🗑️ Pruned backups</b></td>
<td>{{ .Stats.Storages.Local.Pruned }}/{{ .Stats.Storages.Local.Total }} ({{ .Stats.Storages.Local.PruneErrors }} errors)</td>
</tr>
</table>
<br>
<br>
</body>
</html>
{{- end }}

89 changes: 89 additions & 0 deletions templates/02.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{{ define "title_failure" -}}
💥 [ERROR]: Backup Failure: {{ .Config.BackupStopDuringBackupLabel }}
{{- end }}

{{ define "body_failure" -}}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>💥 [ERROR]: Backup Failure: {{ .Config.BackupStopDuringBackupLabel }}</title>
</head>
<style type="text/css">
body {
font-family: Consolas, monospace;;
font-size: 12px;
}
table {
border-width: 1px;
border-color: #3A3A3A;
border-style: dotted;
border-collapse: collapse;
}
table th {
border-width: 1px;
padding: 8px;
border-style: dotted;
border-color: #3A3A3A;
background-color: #E8E8E8;
}
table td {
border-width: 1px;
padding: 8px;
border-style: dotted;
border-color: #3A3A3A;
background-color: #ffffff;
}
</style>
<body>
<table>
<tr>
<th colspan="2">INFO</th>
</tr>
<tr>
<td><b>ℹ️ Name</b></td>
<td>{{ .Config.BackupStopDuringBackupLabel }} ({{ .Config.BackupLatestSymlink }})</td>
</tr>
<tr>
<td><b>💥 Error</b></td>
<td>{{ .Error }}</td>
</tr>
<tr>
<td><b>▶️ Start time</b></td>
<td>{{ .Stats.StartTime | formatTime }}</td>
</tr>
<tr>
<td><b>⏹️ End time</b></td>
<td>{{ .Stats.EndTime | formatTime }}</td>
</tr>
<tr>
<td><b>⌛ Took time</b></td>
<td>{{ .Stats.TookTime }}</td>
</tr>
<tr>
<td><b>🛑 Stopped containers</b></td>
<td>{{ .Stats.Containers.Stopped }}/{{ .Stats.Containers.All }} ({{ .Stats.Containers.StopErrors }} errors)</td>
</tr>
<tr>
<td><b>⚖️ Backup size</b></td>
<td>{{ .Stats.BackupFile.Size | formatBytesBin }} / {{ .Stats.BackupFile.Size | formatBytesDec }}</td>
</tr>
<tr>
<td><b>🗑️ Pruned backups</b></td>
<td>{{ .Stats.Storages.Local.Pruned }}/{{ .Stats.Storages.Local.Total }} ({{ .Stats.Storages.Local.PruneErrors }} errors)</td>
</tr>
</table>
<br>
<br>
<table>
<tr>
<th>LOG</th>
</tr>
<tr>
<td><pre>{{ .Stats.LogOutput }}<pre></td>
</tr>
</table>
</body>
</html>
{{- end }}

0 comments on commit a2b89f1

Please sign in to comment.