Implement shared idempotency, health-aware balancing and replica lifecycle checks

This commit is contained in:
2026-11-06 17:58:43 +03:00
parent 0ab3a341aa
commit 029bf9b377
35 changed files with 2470 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
"""Record non-secret container identity/lifecycle fields for restart evidence."""
import json
import subprocess
import sys
from pathlib import Path
ids = subprocess.check_output(["docker", "compose", "ps", "-q"], text=True).split()
rows = []
for cid in ids:
raw = json.loads(subprocess.check_output(["docker", "inspect", cid], text=True))[0]
rows.append({"id": cid, "service": raw["Config"]["Labels"]["com.docker.compose.service"],
"image_id": raw["Image"], "started_at": raw["State"]["StartedAt"],
"cpu_quota": raw["HostConfig"]["NanoCpus"], "memory": raw["HostConfig"]["Memory"]})
Path(sys.argv[1]).write_text(json.dumps(rows, indent=2) + "\n")