Собрать наблюдаемый стенд, чтобы причину деградации API и worker было видно по метрикам, логам и трассам.

This commit is contained in:
2026-11-07 01:36:19 +03:00
parent 470d9d6f1e
commit 7d4e1237a3
56 changed files with 4419 additions and 53 deletions
+32
View File
@@ -0,0 +1,32 @@
"""Write the local SeaweedFS identity file from .env. The file is gitignored."""
import json
from pathlib import Path
root = Path(__file__).resolve().parents[1]
env = {}
for line in (root / ".env").read_text(encoding="utf-8").splitlines():
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, value = line.split("=", 1)
env[key] = value
out = root / "infra" / "seaweed" / "s3.json"
out.parent.mkdir(parents=True, exist_ok=True)
document = {
"identities": [
{
"name": "app",
"credentials": [
{
"accessKey": env["S3_ACCESS_KEY"],
"secretKey": env["S3_SECRET_KEY"],
}
],
"actions": ["Admin", "Read", "List", "Write", "Tagging"],
}
]
}
out.write_text(json.dumps(document), encoding="utf-8")
print("wrote infra/seaweed/s3.json")