mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-20 11:08:46 +00:00
Merge pull request #4161 from Dokploy/fix/compose-patch-ordering
fix: compose patches overwritten by domain injection
This commit is contained in:
@@ -251,15 +251,22 @@ export const deployCompose = async ({
|
|||||||
} else {
|
} else {
|
||||||
await execAsync(commandWithLog);
|
await execAsync(commandWithLog);
|
||||||
}
|
}
|
||||||
command = "set -e;";
|
|
||||||
if (compose.sourceType !== "raw") {
|
if (compose.sourceType !== "raw") {
|
||||||
|
command = "set -e;";
|
||||||
command += await generateApplyPatchesCommand({
|
command += await generateApplyPatchesCommand({
|
||||||
id: compose.composeId,
|
id: compose.composeId,
|
||||||
type: "compose",
|
type: "compose",
|
||||||
serverId: compose.serverId,
|
serverId: compose.serverId,
|
||||||
});
|
});
|
||||||
|
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
||||||
|
if (compose.serverId) {
|
||||||
|
await execAsyncRemote(compose.serverId, commandWithLog);
|
||||||
|
} else {
|
||||||
|
await execAsync(commandWithLog);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command = "set -e;";
|
||||||
command += await getBuildComposeCommand(entity);
|
command += await getBuildComposeCommand(entity);
|
||||||
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
||||||
if (compose.serverId) {
|
if (compose.serverId) {
|
||||||
@@ -357,6 +364,23 @@ export const rebuildCompose = async ({
|
|||||||
} else {
|
} else {
|
||||||
await execAsync(commandWithLog);
|
await execAsync(commandWithLog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (compose.sourceType !== "raw") {
|
||||||
|
command = "set -e;";
|
||||||
|
command += await generateApplyPatchesCommand({
|
||||||
|
id: compose.composeId,
|
||||||
|
type: "compose",
|
||||||
|
serverId: compose.serverId,
|
||||||
|
});
|
||||||
|
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
||||||
|
if (compose.serverId) {
|
||||||
|
await execAsyncRemote(compose.serverId, commandWithLog);
|
||||||
|
} else {
|
||||||
|
await execAsync(commandWithLog);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
command = "set -e;";
|
||||||
command += await getBuildComposeCommand(compose);
|
command += await getBuildComposeCommand(compose);
|
||||||
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
commandWithLog = `(${command}) >> ${deployment.logPath} 2>&1`;
|
||||||
if (compose.serverId) {
|
if (compose.serverId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user