Skip to content

Commit a8c35f7

Browse files
committed
fix: pin traefik routing to the isolated network when isolated deployment is enabled
1 parent 9f69f6c commit a8c35f7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎packages/server/src/utils/docker/domain.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,17 @@ export const addDomainToCompose = async (
220220
labels.unshift("traefik.swarm.network=dokploy-network");
221221
}
222222
}
223+
} else {
224+
const isolatedNetwork = compose.suffix || compose.appName;
225+
if (compose.composeType === "docker-compose") {
226+
if (!labels.includes(`traefik.docker.network=${isolatedNetwork}`)) {
227+
labels.unshift(`traefik.docker.network=${isolatedNetwork}`);
228+
}
229+
} else {
230+
if (!labels.includes(`traefik.swarm.network=${isolatedNetwork}`)) {
231+
labels.unshift(`traefik.swarm.network=${isolatedNetwork}`);
232+
}
233+
}
223234
}
224235
}
225236

0 commit comments

Comments
 (0)