Skip to content

Commit ea9a466

Browse files
committed
Merge remote-tracking branch 'origin/canary' into feat/infomaniak-dns-provider
2 parents 18e617e + 03cdd00 commit ea9a466

6 files changed

Lines changed: 42 additions & 21 deletions

File tree

‎apps/dokploy/__test__/compose/env-file-literals.test.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,16 @@ const inputEncoding: Record<string, string> = {
5454
DB_HOST: '"${UNDEFINED_HOST:-localhost}"',
5555
};
5656

57-
describe("getCreateEnvFileCommand", () => {
57+
const hasDocker = () => {
58+
try {
59+
execFileSync("docker", ["info"], { stdio: "ignore" });
60+
return true;
61+
} catch {
62+
return false;
63+
}
64+
};
65+
66+
describe.skipIf(!hasDocker())("getCreateEnvFileCommand", () => {
5867
it("writes special environment values that Docker Compose reads back literally", () => {
5968
mkdirSync(codePath, { recursive: true });
6069

‎apps/dokploy/__test__/setup/monitoring-setup.real.test.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,16 @@ const hasRealMonitoring = () => {
154154
);
155155
};
156156

157-
describe.skipIf(hasRealMonitoring())(
157+
const hasDocker = () => {
158+
try {
159+
execSync("docker info", { stdio: "ignore" });
160+
return true;
161+
} catch {
162+
return false;
163+
}
164+
};
165+
166+
describe.skipIf(!hasDocker() || hasRealMonitoring() || !process.env.CI)(
158167
"setupMonitoring - legacy container cleanup (real docker)",
159168
() => {
160169
beforeEach(async () => {

‎packages/server/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"drizzle-zod": "0.5.1",
6767
"lodash": "4.17.21",
6868
"micromatch": "4.0.8",
69-
"nanoid": "3.3.11",
69+
"nanoid": "3.3.18",
7070
"node-os-utils": "2.0.1",
7171
"node-pty": "1.1.0",
7272
"node-schedule": "2.1.1",

‎packages/server/src/utils/builders/docker-file.ts‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,20 @@ export const getDockerCommand = (application: ApplicationNested) => {
2626
try {
2727
const image = `${appName}`;
2828

29-
const dockerContextPath = getDockerContextPath(application);
29+
const defaultContextPath =
30+
dockerFilePath.substring(0, dockerFilePath.lastIndexOf("/") + 1) || ".";
3031

31-
const commandArgs = ["build", "-t", image, "-f", dockerFilePath, "."];
32+
const dockerContextPath =
33+
getDockerContextPath(application) || defaultContextPath;
34+
35+
const commandArgs = [
36+
"build",
37+
"-t",
38+
image,
39+
"-f",
40+
dockerFilePath,
41+
dockerContextPath,
42+
];
3243

3344
if (dockerBuildStage) {
3445
commandArgs.push("--target", dockerBuildStage);

‎packages/server/src/utils/filesystem/directory.ts‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,9 @@ export const getDockerContextPath = (application: Application) => {
138138
const { APPLICATIONS_PATH } = paths(!!application.serverId);
139139
const { appName, dockerContextPath } = application;
140140

141-
return path.join(
142-
APPLICATIONS_PATH,
143-
appName,
144-
"code",
145-
dockerContextPath || ".",
146-
);
141+
if (!dockerContextPath) {
142+
return null;
143+
}
144+
145+
return path.join(APPLICATIONS_PATH, appName, "code", dockerContextPath);
147146
};

‎pnpm-lock.yaml‎

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)