diff --git a/api/edge/edge.go b/api/edge/edge.go index c380f4f8d..d204a3b63 100644 --- a/api/edge/edge.go +++ b/api/edge/edge.go @@ -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. diff --git a/api/portainer.go b/api/portainer.go index 73da24073..b507e6290 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -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