fix: fix environment variable parsing for railpack

This commit is contained in:
andrei1010
2025-07-05 17:14:28 +02:00
parent 5c73ced500
commit d27dff4906
+28 -28
View File
@@ -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" }],
}), }),
}; };
}; };