This commit is contained in:
2025-11-30 15:35:00 +01:00
parent 63bf6b805b
commit bf052fae54
4 changed files with 50 additions and 21 deletions

View File

@@ -25,8 +25,7 @@ def convert_service(service):
for key, value in service.items():
#print(key, value)
# Unsupported in Swarm
if key in ["container_name", "restart", "depends_on"]:
continue
# Move labels → deploy.labels
#print(f"Labels: {deploy_section['labels']}")
@@ -46,11 +45,15 @@ def convert_service(service):
continue
swarm_service[key] = value
# for en in swarm_service['environment']:
# #print(f"Environment Variable: {en} : {swarm_service['environment'][en]}")
# print(en)
# print(swarm_service['environment'][en])
# swarm_service['environment'][en] = str(swarm_service['environment'][en]).lower()
envir = []
for en in swarm_service['environment']:
#print(f"Environment Variable: {en} : {swarm_service['environment'][en]}")
if "=" in en:
e = en.split("=",1)[0]
envir.append(e)
print(en)
print(swarm_service['environment'][en])
swarm_service['environment'].appeendstr(swarm_service['environment'][en]).lower()
#print("Deploy Section:")
#print(swarm_service)
# Merge user deploy section if present