Собрать стенд lab4 с вложениями в приватном S3-bucket.

Метаданные остаются в PostgreSQL, байты — в RustFS, чтобы скачивание пережило остановку одной реплики API.
This commit is contained in:
samsik
2026-11-06 08:49:44 +03:00
parent ec540a1a72
commit 11c8c03984
32 changed files with 2348 additions and 50 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose --env-file .env -f compose.yaml exec -T api python3 - <<'PY'
from urllib.request import urlopen
try:
urlopen("http://s3:9000/messenger-attachments/", timeout=3)
raise SystemExit("anonymous bucket read was allowed")
except Exception as exc:
code = getattr(exc, "code", None)
if code not in (401, 403):
raise SystemExit("unexpected result %s %s" % (type(exc).__name__, code))
print("anonymous S3 status", code)
PY