Docs-as-code: full deploy configs, compose stacks, and DR guide

- Add root README and docs/ (architecture, hosts, disaster-recovery, operations)
- Add compose/ for superset, forgejo, lam, cadvisor; unified deploy compose
- Add scripts/deploy (deploy-atc-docker01.sh, container inventory export)
- Add inventory/containers-atc-docker01.json snapshot
- Add config READMEs for kafka and airflow; .env.example; expand .gitignore
- Sync atclab helper scripts; update homepage/superset compose with env support
This commit is contained in:
Lakehouse Admin
2026-05-19 22:28:01 +02:00
parent c63181abac
commit f5d30824fc
30 changed files with 890 additions and 3 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env python3
import json
import subprocess
SKIP_ENV_PREFIXES = (
"PATH=", "NODE_", "PYTHON_", "GPG_", "LANG=", "YARN=", "HOSTNAME=",
"NGINX_", "NJS_", "ACME_", "DYNPKG_", "PKG_", "CADVISOR_",
)
ids = subprocess.check_output(["docker", "ps", "-aq"], text=True).split()
if not ids or ids == [""]:
raise SystemExit("no containers")
raw = subprocess.check_output(["docker", "inspect", *ids])
data = json.loads(raw)
out = []
for c in data:
env = [
e for e in (c["Config"].get("Env") or [])
if not any(e.startswith(p) for p in SKIP_ENV_PREFIXES)
]
out.append({
"name": c["Name"].lstrip("/"),
"image": c["Config"]["Image"],
"ports": c["NetworkSettings"]["Ports"],
"restart": c["HostConfig"]["RestartPolicy"]["Name"],
"binds": c["HostConfig"].get("Binds") or [],
"volumes": [
{"name": m["Name"], "dest": m["Destination"]}
for m in c["Mounts"]
if m.get("Type") == "volume"
],
"env": env,
})
with open("/root/lakehouse/inventory/containers-atc-docker01.json", "w") as f:
json.dump(out, f, indent=2)
print("wrote", len(out), "containers")