From 88969f66414f76286d263755e863fe6f929639e6 Mon Sep 17 00:00:00 2001 From: AaronDewes Date: Thu, 10 Mar 2022 19:04:54 +0000 Subject: [PATCH] More fixes for host mode apps --- app/lib/composegenerator/v2/networking.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/composegenerator/v2/networking.py b/app/lib/composegenerator/v2/networking.py index 361c50f..ec5d4ad 100644 --- a/app/lib/composegenerator/v2/networking.py +++ b/app/lib/composegenerator/v2/networking.py @@ -62,8 +62,9 @@ def configureMainPort(app: AppStage2, nodeRoot: str) -> AppStage3: if mainPort == False: mainPort = portDetails['port'] - mainContainer = assignIp(mainContainer, app.metadata.id, path.join( - nodeRoot, "apps", "networking.json"), path.join(nodeRoot, ".env")) + if mainContainer.network_mode != "host": + mainContainer = assignIp(mainContainer, app.metadata.id, path.join( + nodeRoot, "apps", "networking.json"), path.join(nodeRoot, ".env")) # Also set the port in metadata app.metadata.port = int(containerPort)