diff --git a/apps/dokploy/__test__/compose/domain/enabled-filter.test.ts b/apps/dokploy/__test__/compose/domain/enabled-filter.test.ts index 1cb696e07..580a33d96 100644 --- a/apps/dokploy/__test__/compose/domain/enabled-filter.test.ts +++ b/apps/dokploy/__test__/compose/domain/enabled-filter.test.ts @@ -3,9 +3,9 @@ import type { Domain } from "@dokploy/server/services/domain"; import { addDomainToCompose } from "@dokploy/server/utils/docker/domain"; import { beforeEach, describe, expect, it, vi } from "vitest"; -// addDomainToCompose reads the compose file from disk through loadDockerCompose -// (existsSync + readFileSync). Mock node:fs so the function runs its real -// label-generation logic against an in-memory compose spec. +// With sourceType "raw", addDomainToCompose parses compose.composeFile +// directly instead of reading from disk, so baseCompose exposes it as a +// getter that always reflects the current composeYaml for each test case. const baseComposeYaml = ` services: frigate: @@ -13,15 +13,6 @@ services: `; let composeYaml = baseComposeYaml; -vi.mock("node:fs", async (importOriginal) => { - const actual = await importOriginal(); - return { - ...actual, - existsSync: vi.fn(() => true), - readFileSync: vi.fn(() => composeYaml), - }; -}); - const baseCompose = { appName: "test-app", composeType: "docker-compose", @@ -31,6 +22,9 @@ const baseCompose = { isolatedDeployment: false, randomize: false, suffix: "", + get composeFile() { + return composeYaml; + }, } as unknown as Compose; const baseDomain: Domain = { diff --git a/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx b/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx index d185e65b1..75ddecbe9 100644 --- a/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx +++ b/apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx @@ -3,6 +3,7 @@ import React, { useEffect, useRef } from "react"; import { FitAddon } from "xterm-addon-fit"; import "@xterm/xterm/css/xterm.css"; import { AttachAddon } from "@xterm/addon-attach"; +import { ClipboardAddon } from "@xterm/addon-clipboard"; import { useTheme } from "next-themes"; import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { fixMacOsAltKeys } from "@/lib/terminal-keyboard"; @@ -46,6 +47,8 @@ export const DockerTerminal: React.FC = ({ const ws = new WebSocket(wsUrl); const addonAttach = new AttachAddon(ws); + const clipboardAddon = new ClipboardAddon(); + term.loadAddon(clipboardAddon); fixMacOsAltKeys(term); // @ts-ignore term.open(termRef.current); @@ -55,6 +58,7 @@ export const DockerTerminal: React.FC = ({ addonFit.fit(); return () => { ws.readyState === WebSocket.OPEN && ws.close(); + term.dispose(); }; }, [containerId, activeWay, id]); diff --git a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx index e12cd60e5..54165c8d1 100644 --- a/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx +++ b/apps/dokploy/components/dashboard/settings/servers/actions/toggle-docker-cleanup.tsx @@ -70,9 +70,9 @@ export const ToggleDockerCleanup = ({ serverId }: Props) => {

Runs a full Docker cleanup daily, pruning stopped containers, - unused images, build cache, and system resources. This - may remove images built for Compose services that run on-demand - (backup runners, cron jobs, one-off tasks). + unused images, build cache, and system resources. This may remove + images built for Compose services that run on-demand (backup + runners, cron jobs, one-off tasks).

For custom cleanup strategies, use{" "}