Some cleanups for app.yml v3

This commit is contained in:
AaronDewes 2022-05-13 10:11:30 +00:00
parent 21276b9de5
commit 1a15d8c39f

View File

@ -71,6 +71,13 @@ def createComposeConfigFromV3(app: dict, nodeRoot: str):
networkingFile = os.path.join(nodeRoot, "apps", "networking.json")
ignoredContainers = []
newApp: App = generateApp(app)
for container in newApp.containers:
# TODO: Make this dynamic and not hardcoded
if container.requires and "c-lightning" in container.requires:
ignoredContainers.append(container.name)
container.ignored = True
elif container.requires:
del container.requires
newApp = convertContainerPermissions(newApp)
newApp = validateEnv(newApp)
newApp = convertDataDirToVolumeGen3(newApp)
@ -81,16 +88,9 @@ def createComposeConfigFromV3(app: dict, nodeRoot: str):
del container.requiredPorts
for container in newApp.containers:
for udpPort in container.requiredUdpPorts:
container.ports.append(udpPort)
container.ports.append("{}/udp".format(udpPort))
del container.requiredUdpPorts
newApp = configureMainPort(newApp, nodeRoot)
for container in newApp.containers:
# TODO: Make this dynamic and not hardcoded
if container.requires and "c-lightning" in container.requires:
ignoredContainers.append(container.name)
container.ignored = True
elif container.requires:
del container.requires
newApp = configureHiddenServices(newApp, nodeRoot)
for container in newApp.containers:
del container.ignored