Add label to optionally skip container restart after backup (#659)

* Add label to optionally skip container restart after backup

* Add new mutually exclusive label instead

* Simplified `hasLabel`

* removed unnecessary else block

* added new test-case `no-restart` based on test-case `local`

* removed invalid README entry

* added new section to how-tos

* Added configuration reference
This commit is contained in:
Jean Michel
2025-11-01 10:52:56 +01:00
committed by GitHub
parent 52234592b2
commit 60482b2045
7 changed files with 307 additions and 114 deletions

View File

@@ -11,6 +11,7 @@ import (
"sync"
"time"
ctr "github.com/docker/docker/api/types/container"
"github.com/offen/docker-volume-backup/internal/errwrap"
"github.com/robfig/cron/v3"
)
@@ -64,9 +65,15 @@ func (noopWriteCloser) Close() error {
return nil
}
type handledContainer struct {
summary ctr.Summary
restart bool
}
type handledSwarmService struct {
serviceID string
initialReplicaCount uint64
restart bool
}
type concurrentSlice[T any] struct {