mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-23 04:18:45 +00:00
fix: fix environment variable parsing for railpack
This commit is contained in:
@@ -287,7 +287,7 @@ export const parseEnvironmentKeyValuePair = (
|
|||||||
throw new Error(`Invalid environment variable pair: ${pair}`);
|
throw new Error(`Invalid environment variable pair: ${pair}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return [key, valueParts.join("")];
|
return [key, valueParts.join("=")];
|
||||||
};
|
};
|
||||||
|
|
||||||
export const getEnviromentVariablesObject = (
|
export const getEnviromentVariablesObject = (
|
||||||
@@ -370,53 +370,53 @@ export const generateConfigContainer = (application: ApplicationNested) => {
|
|||||||
}),
|
}),
|
||||||
...(restartPolicySwarm
|
...(restartPolicySwarm
|
||||||
? {
|
? {
|
||||||
RestartPolicy: restartPolicySwarm,
|
RestartPolicy: restartPolicySwarm,
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(placementSwarm
|
...(placementSwarm
|
||||||
? {
|
? {
|
||||||
Placement: placementSwarm,
|
Placement: placementSwarm,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
// if app have mounts keep manager as constraint
|
// if app have mounts keep manager as constraint
|
||||||
Placement: {
|
Placement: {
|
||||||
Constraints: haveMounts ? ["node.role==manager"] : [],
|
Constraints: haveMounts ? ["node.role==manager"] : [],
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
...(labelsSwarm && {
|
...(labelsSwarm && {
|
||||||
Labels: labelsSwarm,
|
Labels: labelsSwarm,
|
||||||
}),
|
}),
|
||||||
...(modeSwarm
|
...(modeSwarm
|
||||||
? {
|
? {
|
||||||
Mode: modeSwarm,
|
Mode: modeSwarm,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
// use replicas value if no modeSwarm provided
|
// use replicas value if no modeSwarm provided
|
||||||
Mode: {
|
Mode: {
|
||||||
Replicated: {
|
Replicated: {
|
||||||
Replicas: replicas,
|
Replicas: replicas,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}),
|
},
|
||||||
|
}),
|
||||||
...(rollbackConfigSwarm && {
|
...(rollbackConfigSwarm && {
|
||||||
RollbackConfig: rollbackConfigSwarm,
|
RollbackConfig: rollbackConfigSwarm,
|
||||||
}),
|
}),
|
||||||
...(updateConfigSwarm
|
...(updateConfigSwarm
|
||||||
? { UpdateConfig: updateConfigSwarm }
|
? { UpdateConfig: updateConfigSwarm }
|
||||||
: {
|
: {
|
||||||
// default config if no updateConfigSwarm provided
|
// default config if no updateConfigSwarm provided
|
||||||
UpdateConfig: {
|
UpdateConfig: {
|
||||||
Parallelism: 1,
|
Parallelism: 1,
|
||||||
Order: "start-first",
|
Order: "start-first",
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
...(networkSwarm
|
...(networkSwarm
|
||||||
? {
|
? {
|
||||||
Networks: networkSwarm,
|
Networks: networkSwarm,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
Networks: [{ Target: "dokploy-network" }],
|
Networks: [{ Target: "dokploy-network" }],
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user