[DEPLOY] CT113 и CT134: observability под compose; исправлено поле Config.Cmd в генераторе
lint / hygiene (push) Successful in 13s

This commit is contained in:
root committed 2026-10-28 13:44:22 +03:00
1 parent f2717f40c2
commit 2c3d37958b
4 files changed
+42 -5

No files matched your search

+10 -2
View File
@@ -105,8 +105,8 @@ def build(ct):
if env:
svc["environment"] = env
if cfg.get("Command"):
svc["command"] = cfg["Command"]
if cfg.get("Cmd"):
svc["command"] = cfg["Cmd"]
elif "promtail" in cfg["Image"]:
# promtail без явного -config.file берёт встроенный конфиг образа
# (в нём нет clients) и падает: "at least one client config must be provided".
@@ -182,6 +182,14 @@ def main():
for k in sorted(envfile):
f.write(f"{k}=\n")
print(f"CT{ct}: {len(services)} сервисов, {len(envfile)} секретов -> {d}/docker-compose.yml")
if "--env-out" in sys.argv:
envpath = f"/root/.env-out/ct{ct}.env"
os.makedirs("/root/.env-out", exist_ok=True)
with open(envpath, "w", encoding="utf-8") as f:
for k in sorted(envfile):
f.write(f'{k}="{envfile[k]}"\n')
os.chmod(envpath, 0o600)
print(f"CT{ct}: значения -> {envpath} (в Git не попадает)")
else:
print(body)
return 0