From 288b165d1f4e162e54141ffb5df8bd15c25c4904 Mon Sep 17 00:00:00 2001 From: Aaron Dewes Date: Sun, 14 Nov 2021 18:47:33 +0000 Subject: [PATCH] Fix apps on Tor --- app/lib/composegenerator/v1/networking.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/lib/composegenerator/v1/networking.py b/app/lib/composegenerator/v1/networking.py index c922ea8..d23e52d 100644 --- a/app/lib/composegenerator/v1/networking.py +++ b/app/lib/composegenerator/v1/networking.py @@ -132,12 +132,14 @@ def configureMainPort(app: dict, nodeRoot: str): mainContainer['ports'].append(portToAppend) # Set the main port to the first port in the list, if it contains a :, it's the port after the : # If it doesn't contain a :, it's the port itself - if not mainPort: + if mainPort == False: mainPort = mainContainer['ports'][0] if(mainPort.find(":") != -1): mainPort = mainPort.split(":")[1] else: mainContainer['ports'] = [portToAppend] + if mainPort == False: + mainPort = portDetails['port'] mainContainer = assignIp(mainContainer, app['metadata']['id'], path.join( nodeRoot, "apps", "networking.json"), path.join(nodeRoot, ".env"))