docker-stack: add deploy config
This commit is contained in:
parent
c5bba581f5
commit
6f7bf47520
2 changed files with 29 additions and 0 deletions
|
@ -80,6 +80,10 @@ in
|
|||
"${mirrorVolume dynamicConfigFile}:ro"
|
||||
"${mirrorVolume config.age.secrets.traefik-dashboard-basicauth-users.path}:ro"
|
||||
];
|
||||
deploy = {
|
||||
placement.constraints = [ "node.role==manager" ];
|
||||
update_config.order = "start-first";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -96,6 +96,31 @@ let
|
|||
]
|
||||
'';
|
||||
};
|
||||
|
||||
deploy = {
|
||||
placement = {
|
||||
constraints = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf types.str;
|
||||
description = lib.mdDoc "";
|
||||
example = [ "node.role==manager" ];
|
||||
};
|
||||
};
|
||||
update_config = {
|
||||
order = mkOption {
|
||||
default = "stop-first";
|
||||
type = types.str;
|
||||
description = lib.mdDoc ''
|
||||
Order of operations during updates.
|
||||
- stop-first (old task is stopped before starting new one),
|
||||
- start-first (new task is started first, and the running tasks briefly overlap)
|
||||
|
||||
Note: Only supported for v3.4 and higher.
|
||||
'';
|
||||
example = "start-first";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue