Merge pull request #5004 from Dokploy/fix/isolated-deployment-traefik-network-label

fix: pin Traefik routing to the isolated network on isolated deployments
This commit is contained in:
Mauricio Siu
2026-08-07 01:14:42 -06:00
committed by GitHub
@@ -220,6 +220,17 @@ export const addDomainToCompose = async (
labels.unshift("traefik.swarm.network=dokploy-network");
}
}
} else {
const isolatedNetwork = compose.suffix || compose.appName;
if (compose.composeType === "docker-compose") {
if (!labels.includes(`traefik.docker.network=${isolatedNetwork}`)) {
labels.unshift(`traefik.docker.network=${isolatedNetwork}`);
}
} else {
if (!labels.includes(`traefik.swarm.network=${isolatedNetwork}`)) {
labels.unshift(`traefik.swarm.network=${isolatedNetwork}`);
}
}
}
}