feat(templates): support isolated = false opt-out in template.toml

Templates using network_mode: host (e.g. cloudflared) can now declare
isolated = false in their [config] section to prevent Dokploy from
injecting networks into the compose, which would cause a Docker error.

Default behavior (isolated = true) is unchanged for all existing templates.

Fixes #4366
This commit is contained in:
Mauricio Siu
2026-05-08 19:22:00 -06:00
parent 8227a48ef4
commit c182755591
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -640,7 +640,7 @@ export const composeRouter = createTRPCRouter({
name: input.id, name: input.id,
sourceType: "raw", sourceType: "raw",
appName: appName, appName: appName,
isolatedDeployment: true, isolatedDeployment: template.config.config?.isolated !== false,
}); });
await addNewService(ctx, compose.composeId); await addNewService(ctx, compose.composeId);
+1
View File
@@ -21,6 +21,7 @@ export interface CompleteTemplate {
[key: string]: string; [key: string]: string;
}; };
config: { config: {
isolated?: boolean;
domains: Array<{ domains: Array<{
serviceName: string; serviceName: string;
port: number; port: number;