More fixes for host mode apps

This commit is contained in:
AaronDewes 2022-03-10 19:04:54 +00:00
parent 96f942e7a0
commit 88969f6641

View File

@ -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)