From b3cf1c82507e6d660017a9952153d43a6d31f810 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 3 Aug 2026 13:24:44 +0000 Subject: [PATCH] fix: handle nested and flat fw.conf formats --- python/deploy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/deploy.py b/python/deploy.py index 6ab533e..5dfd46b 100644 --- a/python/deploy.py +++ b/python/deploy.py @@ -105,10 +105,12 @@ def container_status(): def deploy_all(): cfg = load_config() - if not cfg.get("nodes"): + nodes = cfg.get("nodes", cfg) # support both {"nodes":{...}} and flat format + if not nodes: print("No nodes in fw.conf") return - for name, nc in cfg.items(): + for name, nc in nodes.items(): + if not isinstance(nc, dict): continue deploy_container(name, nc["token"], nc.get("cloud","EU"), str(nc.get("port","8081")), nc.get("upstream_ip","127.0.0.1"), str(nc.get("upstream_port","80")), nc.get("labels",""),