Merge branch 'Dokploy:canary' into fix/whitelabeling-fouc

This commit is contained in:
Yash Kumar 2026-09-02 17:25:46 +05:30 committed by GitHub
commit e25e241cf5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 38 additions and 10 deletions

View File

@ -54,7 +54,16 @@ const inputEncoding: Record<string, string> = {
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 });

View File

@ -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 () => {

View File

@ -26,9 +26,20 @@ 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);

View File

@ -138,10 +138,9 @@ export const getDockerContextPath = (application: Application) => {
const { APPLICATIONS_PATH } = paths(!!application.serverId);
const { appName, dockerContextPath } = application;
return path.join(
APPLICATIONS_PATH,
appName,
"code",
dockerContextPath || ".",
);
if (!dockerContextPath) {
return null;
}
return path.join(APPLICATIONS_PATH, appName, "code", dockerContextPath);
};