From 63ec2a33ae7cb612c3b2ef464b8dde0fe9b96e88 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 17 Feb 2023 14:45:13 +0100 Subject: [PATCH] fix: network in compose files --- apps/api/src/lib/buildPacks/compose.ts | 17 ++++++++++------- .../routes/applications/[id]/logs/index.svelte | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/api/src/lib/buildPacks/compose.ts b/apps/api/src/lib/buildPacks/compose.ts index f0f966ddb..9e3ab12cb 100644 --- a/apps/api/src/lib/buildPacks/compose.ts +++ b/apps/api/src/lib/buildPacks/compose.ts @@ -66,12 +66,12 @@ export default async function (data) { } } } - if (build.length > 0 || buildArgs.length > 0 ) { - value['build'] = { - ...build, - args: finalArgs - }; - } + if (build.length > 0 || buildArgs.length > 0) { + value['build'] = { + ...build, + args: finalArgs + }; + } value['labels'] = labels; // TODO: If we support separated volume for each service, we need to add it here @@ -104,8 +104,11 @@ export default async function (data) { name: network }; }); + value['networks'] = [...(value['networks'] || ''), network]; + } else { + value['networks'] = [network]; } - value['networks'] = [...(value['networks'] || ''), network]; + dockerComposeYaml.services[key] = { ...dockerComposeYaml.services[key], restart: defaultComposeConfiguration(network).restart, diff --git a/apps/ui/src/routes/applications/[id]/logs/index.svelte b/apps/ui/src/routes/applications/[id]/logs/index.svelte index 48922e660..c52e1d0cf 100644 --- a/apps/ui/src/routes/applications/[id]/logs/index.svelte +++ b/apps/ui/src/routes/applications/[id]/logs/index.svelte @@ -111,7 +111,7 @@
Application Logs
-
+
{#each services as service}