Files
mtusi2026lab5/evidence/stack.txt
T
2026-10-26 19:40:34 +03:00

40 lines
3.3 KiB
Plaintext

python student-tests/check_stack.py
docker: 29.6.2
compose: 5.3.1
container_name: not set for any service (replicas of one service are possible)
api replicas running: 2 -> ['48dc392933dc', 'c1b7e1ab5673'] (deploy.replicas = 2)
service container cpus memory published ports networks
worker 292a36c54a41 1.00 1024Mi - backend
api 48dc392933dc 1.00 512Mi - backend, edge
valkey 4e223cb9301e 0.50 128Mi - backend
s3 892c7ca290f2 0.50 512Mi - backend
lb 8be67a2e86b7 0.50 128Mi 127.0.0.1:8080->8080/tcp, 127.0.0.1:8081->8081/tcp, 127.0.0.1:8404->8404/tcp edge
broker 9f909ed7ecea 1.00 512Mi - backend
api c1b7e1ab5673 1.00 512Mi - backend, edge
postgres d2bfd48385f1 1.00 512Mi - backend
published: only lb, only on 127.0.0.1 (api replicas have no ports)
balancer: every api server is under the /health/ready check, no backup servers -> api1 UP (L7OK), api2 UP (L7OK)
limits: every running container has CPU and RAM limits
networks: lb -> edge; api -> edge + backend; postgres, valkey, s3, broker, worker -> backend (internal: no way out)
broker: rabbitmq:4.2.9-alpine, volume rabbitmqdata, hostname broker, no ports, no web console; worker: separate service (1 running), no ports
s3: no published ports; master/filer web UIs only on 127.0.0.1 inside the container; IAM API off; pinned image; volume s3data
secrets: api -> broker_url, cache_url, database_url, s3_access_key_id, s3_secret_access_key; worker -> broker_url, database_url, s3_access_key_id, s3_secret_access_key; broker -> broker_credentials; migrate -> database_url; lb -> none; postgres -> postgres_password; valkey -> valkey_acl; s3 -> s3_config; s3-init -> s3_root_password, s3_root_user
images: lb haproxy:3.2.25-alpine; api mtusi-messenger:lab5; worker mtusi-messenger:lab5; postgres postgres:17.10-bookworm; valkey valkey/valkey:8.1.9; s3 chrislusf/seaweedfs:4.44; broker rabbitmq:4.2.9-alpine
PASS: one entry point (lb on 127.0.0.1), >= 2 api replicas without ports and container_name, only ready replicas get traffic, CPU/RAM limits everywhere, stores (incl. S3) only on the internal network, S3 admin credentials only in s3-init; broker and worker are separate services
docker compose ps -a --format "table {{.Service}}\t{{.ID}}\t{{.Status}}"
SERVICE CONTAINER ID STATUS
api 48dc392933dc Up 49 seconds (healthy)
api c1b7e1ab5673 Up 49 seconds (healthy)
broker 9f909ed7ecea Up About a minute (healthy)
lb 8be67a2e86b7 Up 48 seconds (healthy)
migrate a5a9934b4d6b Exited (0) About a minute ago
postgres d2bfd48385f1 Up About a minute (healthy)
s3 892c7ca290f2 Up About a minute (healthy)
s3-init deab1aa2b022 Exited (0) 50 seconds ago
valkey 4e223cb9301e Up About a minute (healthy)
worker 292a36c54a41 Up 49 seconds (healthy)
s3-init-1 | s3-init: bucket messenger-attachments already exists; anonymous access: 403 (private)
migrate-1 | 2026-10-26 16:15:25,625 INFO messenger.db: Миграции: новых нет, схема актуальна