mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add network swarm json
This commit is contained in:
@@ -73,6 +73,7 @@ export const mechanizeDockerContainer = async (
|
||||
cpuReservation,
|
||||
command,
|
||||
ports,
|
||||
networkSwarm,
|
||||
} = application;
|
||||
|
||||
const resources = calculateResources({
|
||||
@@ -92,6 +93,7 @@ export const mechanizeDockerContainer = async (
|
||||
Mode,
|
||||
RollbackConfig,
|
||||
UpdateConfig,
|
||||
Networks,
|
||||
} = generateConfigContainer(application);
|
||||
|
||||
const bindsMount = generateBindMounts(mounts);
|
||||
@@ -134,7 +136,7 @@ export const mechanizeDockerContainer = async (
|
||||
: {}),
|
||||
Labels,
|
||||
},
|
||||
Networks: [{ Target: "dokploy-network" }],
|
||||
Networks,
|
||||
RestartPolicy,
|
||||
Placement,
|
||||
Resources: {
|
||||
|
||||
@@ -210,6 +210,7 @@ export const generateConfigContainer = (application: ApplicationNested) => {
|
||||
labelsSwarm,
|
||||
replicas,
|
||||
mounts,
|
||||
networkSwarm,
|
||||
} = application;
|
||||
|
||||
const haveMounts = mounts.length > 0;
|
||||
@@ -265,6 +266,13 @@ export const generateConfigContainer = (application: ApplicationNested) => {
|
||||
Order: "start-first",
|
||||
},
|
||||
}),
|
||||
...(networkSwarm
|
||||
? {
|
||||
Networks: networkSwarm,
|
||||
}
|
||||
: {
|
||||
Networks: [{ Target: "dokploy-network" }],
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user