From 544363d077532aeada4c2f52865970f9bb02228d Mon Sep 17 00:00:00 2001 From: zekroTJA Date: Fri, 15 May 2026 12:58:02 +0200 Subject: [PATCH] add label extract script --- python/docker-compose-labels.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 python/docker-compose-labels.py diff --git a/python/docker-compose-labels.py b/python/docker-compose-labels.py new file mode 100644 index 0000000..ec5767a --- /dev/null +++ b/python/docker-compose-labels.py @@ -0,0 +1,13 @@ +import yaml + +LABEL = "leuchtturm.enable" + +with open(0) as f: + res = yaml.safe_load(f) + +for key, service in res["services"].items(): + if "labels" not in service: + continue + labels = service["labels"] + if LABEL in labels: + print(key, end=" ")