ЛР 5: RabbitMQ, асинхронные миниатюры и отказы — на 3

This commit is contained in:
2026-11-20 20:09:59 +03:00
parent 276dbdad8a
commit 3f8d7fb56b
50 changed files with 3388 additions and 39 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
# Docker socket actions are scoped to the explicitly named course stack.
case "${LAB5_PROJECT:-}" in
mtusi-lab5-grade3|mtusi-lab5-grade3-*) ;;
*) echo 'LAB5_PROJECT must identify the Lab 5 test stack' >&2; exit 2 ;;
esac
container() {
ids=$(docker ps -aq --filter "label=com.docker.compose.project=$LAB5_PROJECT" \
--filter "label=com.docker.compose.service=$1" \
--filter 'label=com.docker.compose.oneoff=False')
set -- $ids
if [ "$#" -ne 1 ]; then
echo 'Expected one Lab 5 service container' >&2
return 2
fi
printf '%s\n' "$1"
}