mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
Rolling restart (#619)
* implement rolling restart functionality bouncing each image individually can ensure that a group of docker containers launched with docker-compose can stay 100% up during deploy. * move rolling restart into a function * honor params.Cleanup Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
parent
6a18ee911e
commit
c56e0a95a7
5 changed files with 53 additions and 9 deletions
|
|
@ -30,7 +30,8 @@ var (
|
|||
notifier *notifications.Notifier
|
||||
timeout time.Duration
|
||||
lifecycleHooks bool
|
||||
scope string
|
||||
rollingRestart bool
|
||||
scope string
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
|
|
@ -91,6 +92,7 @@ func PreRun(cmd *cobra.Command, args []string) {
|
|||
|
||||
enableLabel, _ = f.GetBool("label-enable")
|
||||
lifecycleHooks, _ = f.GetBool("enable-lifecycle-hooks")
|
||||
rollingRestart, _ = f.GetBool("rolling-restart")
|
||||
scope, _ = f.GetString("scope")
|
||||
|
||||
log.Debug(scope)
|
||||
|
|
@ -211,6 +213,7 @@ func runUpdatesWithNotifications(filter t.Filter) {
|
|||
Timeout: timeout,
|
||||
MonitorOnly: monitorOnly,
|
||||
LifecycleHooks: lifecycleHooks,
|
||||
RollingRestart: rollingRestart,
|
||||
}
|
||||
err := actions.Update(client, updateParams)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue