Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/server/src/utils/docker/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
}
Comment on lines +223 to 234

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Mapping labels bypass network pinning

When an isolated service uses Compose's valid mapping form for labels, the surrounding Array.isArray(labels) guard skips this new network label entirely, leaving multi-network services subject to the same ambiguous Traefik backend selection and intermittent domain outages this change is intended to fix.

Knowledge Base Used: Traefik Networking

}

Expand Down
Loading