Реализовать lab4 на оценку 4: SeaweedFS, вложения и согласованность БД/S3.

Перенесён стенд lab3 (API, Redis-сессии, идемпотентность, HAProxy, реплики API). Добавлены приватный bucket SeaweedFS с отдельным ключом API, загрузка PNG/JPEG с лимитами и полной проверкой, компенсация и reconciler, плавная остановка API, тесты и evidence.
This commit is contained in:
Mikhail Verkovykh
2026-11-06 19:48:37 +03:00
parent ec540a1a72
commit 728e53cc55
94 changed files with 8821 additions and 43 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
# Restart API replicas and ALL state stores (PostgreSQL, Redis, SeaweedFS S3); preserve volumes.
cd "$(dirname "$0")/.."
REPLICAS="${API_REPLICAS:-2}"
docker compose --env-file .env restart postgres redis s3
# s3-gw shares the s3 network namespace and must be restarted after it.
docker compose --env-file .env restart s3-gw
# "up -d" alone leaves running replicas untouched; restart them, then restore the scale
# (migrate/s3-init already applied; skip one-shots).
docker compose --env-file .env restart api
docker compose --env-file .env up -d --no-deps --scale "api=${REPLICAS}" api
docker compose --env-file .env restart lb
exit 0