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

View File

@@ -640,7 +640,7 @@ export const composeRouter = createTRPCRouter({
name: input.id,
sourceType: "raw",
appName: appName,
isolatedDeployment: true,
isolatedDeployment: template.config.config?.isolated !== false,
});
await addNewService(ctx, compose.composeId);

View File

@@ -21,6 +21,7 @@ export interface CompleteTemplate {
[key: string]: string;
};
config: {
isolated?: boolean;
domains: Array<{
serviceName: string;
port: number;