feat(app/stack): ability to prune volumes on stack/edge stack delete (#232)

Co-authored-by: oscarzhou <oscar.zhou@portainer.io>
pull/11388/head
LP B 2024-12-31 22:44:49 +01:00 committed by GitHub
parent 33ea22c0a9
commit 85f52d2574
2 changed files with 13 additions and 1 deletions

View File

@ -64,9 +64,14 @@ type (
DeployerOptionsPayload struct {
// Prune is a flag indicating if the agent must prune the containers or not when creating/updating an edge stack
// This flag drives docker compose `--remove-orphans` and docker stack `--prune` options
// This flag drives `docker compose up --remove-orphans` and `docker stack up --prune` options
// Used only for EE
Prune bool
// RemoveVolumes is a flag indicating if the agent must remove the named volumes declared
// in the compose file and anonymouse volumes attached to containers
// This flag drives `docker compose down --volumes` option
// Used only for EE
RemoveVolumes bool
}
// RegistryCredentials holds the credentials for a Docker registry.

View File

@ -1395,6 +1395,13 @@ type (
Prune bool
}
ComposeDownOptions struct {
// RemoveVolumes will remove the named volumes declared in the compose file
// and anonymous volumes attached to the stack's containers
// Drives `docker compose down --volumes`
RemoveVolumes bool
}
ComposeRunOptions struct {
ComposeOptions