diff --git a/apps/dokploy/components/dashboard/compose/general/actions.tsx b/apps/dokploy/components/dashboard/compose/general/actions.tsx index da650385b..af3e8aced 100644 --- a/apps/dokploy/components/dashboard/compose/general/actions.tsx +++ b/apps/dokploy/components/dashboard/compose/general/actions.tsx @@ -89,55 +89,51 @@ export const ComposeActions = ({ composeId }: Props) => { )} - {canDeploy && - data?.composeType === "docker-compose" && ( - { - await deploy({ - composeId: composeId, - freshVolumes: true, + {canDeploy && data?.composeType === "docker-compose" && ( + { + await deploy({ + composeId: composeId, + freshVolumes: true, + }) + .then(() => { + toast.success("Compose deployed with fresh volumes"); + refetch(); + router.push( + `/dashboard/project/${data?.environment.projectId}/environment/${data?.environmentId}/services/compose/${composeId}?tab=deployments`, + ); }) - .then(() => { - toast.success( - "Compose deployed with fresh volumes", - ); - refetch(); - router.push( - `/dashboard/project/${data?.environment.projectId}/environment/${data?.environmentId}/services/compose/${composeId}?tab=deployments`, - ); - }) - .catch(() => { - toast.error("Error deploying compose"); - }); - }} + .catch(() => { + toast.error("Error deploying compose"); + }); + }} + > + - - )} + + +
+ + Fresh Volumes +
+
+ + +

+ Deploy with fresh volumes (removes all persistent data) +

+
+
+
+ +
+ )} {canDeploy && (