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",""),