This commit is contained in:
2025-11-30 18:01:08 +01:00
parent f49b9a13e0
commit a1ceec582a

View File

@@ -1,6 +1,7 @@
import yaml
import sys
import re
import os
stack_name = sys.argv[1]
INPUT_FILE = f"{stack_name}/docker-compose.yml"
OUTPUT_FILE = f"__swarm/{stack_name}/{stack_name}-swarm.yml"
@@ -155,7 +156,8 @@ def convert_compose_to_swarm(data):
return data
def main():
fix_env_file(f"__swarm/{stack_name}/stack.env") # NEW FIX STEP
if os.path.exists(f"__swarm/{stack_name}/stack.env"):
fix_env_file(f"__swarm/{stack_name}/stack.env") # NEW FIX STEP
with open(INPUT_FILE, "r") as f:
compose = yaml.safe_load(f)
#input(compose)