From 8c9e473b4eb23f6b02d7f4ed42632f32c83bb86c Mon Sep 17 00:00:00 2001 From: Yash Kumar Date: Wed, 2 Sep 2026 16:59:57 +0530 Subject: [PATCH 1/4] test: fix CI failures and improve local test robustness --- .../__test__/compose/env-file-literals.test.ts | 11 ++++++++++- .../__test__/setup/monitoring-setup.real.test.ts | 11 ++++++++++- packages/server/src/utils/builders/docker-file.ts | 8 ++++++-- packages/server/src/utils/filesystem/directory.ts | 6 +++++- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/apps/dokploy/__test__/compose/env-file-literals.test.ts b/apps/dokploy/__test__/compose/env-file-literals.test.ts index b7223ca4a..1c7ee65b0 100644 --- a/apps/dokploy/__test__/compose/env-file-literals.test.ts +++ b/apps/dokploy/__test__/compose/env-file-literals.test.ts @@ -54,7 +54,16 @@ const inputEncoding: Record = { DB_HOST: '"${UNDEFINED_HOST:-localhost}"', }; -describe("getCreateEnvFileCommand", () => { +const hasDocker = () => { + try { + execFileSync("docker", ["info"], { stdio: "ignore" }); + return true; + } catch { + return false; + } +}; + +describe.skipIf(!hasDocker())("getCreateEnvFileCommand", () => { it("writes special environment values that Docker Compose reads back literally", () => { mkdirSync(codePath, { recursive: true }); diff --git a/apps/dokploy/__test__/setup/monitoring-setup.real.test.ts b/apps/dokploy/__test__/setup/monitoring-setup.real.test.ts index 89b8b390d..590d67b21 100644 --- a/apps/dokploy/__test__/setup/monitoring-setup.real.test.ts +++ b/apps/dokploy/__test__/setup/monitoring-setup.real.test.ts @@ -154,7 +154,16 @@ const hasRealMonitoring = () => { ); }; -describe.skipIf(hasRealMonitoring())( +const hasDocker = () => { + try { + execSync("docker info", { stdio: "ignore" }); + return true; + } catch { + return false; + } +}; + +describe.skipIf(!hasDocker() || hasRealMonitoring() || !process.env.CI)( "setupMonitoring - legacy container cleanup (real docker)", () => { beforeEach(async () => { diff --git a/packages/server/src/utils/builders/docker-file.ts b/packages/server/src/utils/builders/docker-file.ts index b02156ee8..12cee9aa9 100644 --- a/packages/server/src/utils/builders/docker-file.ts +++ b/packages/server/src/utils/builders/docker-file.ts @@ -26,9 +26,13 @@ export const getDockerCommand = (application: ApplicationNested) => { try { const image = `${appName}`; - const dockerContextPath = getDockerContextPath(application); + const defaultContextPath = + dockerFilePath.substring(0, dockerFilePath.lastIndexOf("/") + 1) || "."; - const commandArgs = ["build", "-t", image, "-f", dockerFilePath, "."]; + const dockerContextPath = + getDockerContextPath(application) || defaultContextPath; + + const commandArgs = ["build", "-t", image, "-f", dockerFilePath, dockerContextPath]; if (dockerBuildStage) { commandArgs.push("--target", dockerBuildStage); diff --git a/packages/server/src/utils/filesystem/directory.ts b/packages/server/src/utils/filesystem/directory.ts index c5e354ac8..edbc77d67 100644 --- a/packages/server/src/utils/filesystem/directory.ts +++ b/packages/server/src/utils/filesystem/directory.ts @@ -138,10 +138,14 @@ export const getDockerContextPath = (application: Application) => { const { APPLICATIONS_PATH } = paths(!!application.serverId); const { appName, dockerContextPath } = application; + if (!dockerContextPath) { + return null; + } + return path.join( APPLICATIONS_PATH, appName, "code", - dockerContextPath || ".", + dockerContextPath, ); }; From c901260d81e12e216f3a3e93207f40fd0b0fdcbe Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 11:35:17 +0000 Subject: [PATCH 2/4] [autofix.ci] apply automated fixes --- packages/server/src/utils/builders/docker-file.ts | 9 ++++++++- packages/server/src/utils/filesystem/directory.ts | 7 +------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/server/src/utils/builders/docker-file.ts b/packages/server/src/utils/builders/docker-file.ts index 12cee9aa9..13bc05fc6 100644 --- a/packages/server/src/utils/builders/docker-file.ts +++ b/packages/server/src/utils/builders/docker-file.ts @@ -32,7 +32,14 @@ export const getDockerCommand = (application: ApplicationNested) => { const dockerContextPath = getDockerContextPath(application) || defaultContextPath; - const commandArgs = ["build", "-t", image, "-f", dockerFilePath, dockerContextPath]; + const commandArgs = [ + "build", + "-t", + image, + "-f", + dockerFilePath, + dockerContextPath, + ]; if (dockerBuildStage) { commandArgs.push("--target", dockerBuildStage); diff --git a/packages/server/src/utils/filesystem/directory.ts b/packages/server/src/utils/filesystem/directory.ts index edbc77d67..6865c576d 100644 --- a/packages/server/src/utils/filesystem/directory.ts +++ b/packages/server/src/utils/filesystem/directory.ts @@ -142,10 +142,5 @@ export const getDockerContextPath = (application: Application) => { return null; } - return path.join( - APPLICATIONS_PATH, - appName, - "code", - dockerContextPath, - ); + return path.join(APPLICATIONS_PATH, appName, "code", dockerContextPath); }; From f58ff1062e56b1b218203e90e5332897929bb755 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Sep 2026 21:35:43 +0000 Subject: [PATCH 3/4] chore(deps): bump nanoid Bumps the npm_and_yarn group with 1 update in the /packages/server directory: [nanoid](https://github.com/ai/nanoid). Updates `nanoid` from 3.3.11 to 3.3.18 - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/3.3.18/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.11...3.3.18) --- updated-dependencies: - dependency-name: nanoid dependency-version: 3.3.18 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- packages/server/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/package.json b/packages/server/package.json index abc10d8c7..f6bdfdee8 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -66,7 +66,7 @@ "drizzle-zod": "0.5.1", "lodash": "4.17.21", "micromatch": "4.0.8", - "nanoid": "3.3.11", + "nanoid": "3.3.18", "node-os-utils": "2.0.1", "node-pty": "1.1.0", "node-schedule": "2.1.1", From ad00669f0f328215aea58e3bf35474f315fd83c6 Mon Sep 17 00:00:00 2001 From: Narciso Date: Wed, 2 Sep 2026 17:41:00 -0400 Subject: [PATCH 4/4] fix: sync pnpm-lock.yaml with nanoid 3.3.18 The nanoid specifier in packages/server/package.json was bumped to 3.3.18 but the lockfile entry was not updated, causing pnpm install --frozen-lockfile to fail in CI. --- pnpm-lock.yaml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d915e002..b061b83e4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -679,8 +679,8 @@ importers: specifier: 4.0.8 version: 4.0.8 nanoid: - specifier: 3.3.11 - version: 3.3.11 + specifier: 3.3.18 + version: 3.3.18 node-os-utils: specifier: 2.0.1 version: 2.0.1 @@ -7186,11 +7186,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - nanoid@3.3.12: - resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - nanoid@3.3.18: resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -16295,8 +16290,6 @@ snapshots: nanoid@3.3.11: {} - nanoid@3.3.12: {} - nanoid@3.3.18: {} nanostores@1.1.1: {} @@ -16777,7 +16770,7 @@ snapshots: postcss@8.5.15: dependencies: - nanoid: 3.3.12 + nanoid: 3.3.18 picocolors: 1.1.1 source-map-js: 1.2.1