mirror of
https://github.com/runcitadel/core.git
synced 2024-12-27 07:05:05 +00:00
Some cleanups for app.yml v3
This commit is contained in:
parent
21276b9de5
commit
1a15d8c39f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user