chore(solution): port lab3 sources

This commit is contained in:
2026-11-20 03:05:34 +03:00
parent ec540a1a72
commit 083d0d80cc
44 changed files with 2745 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
ENGINE=${ENGINE:-$(command -v podman >/dev/null 2>&1 && echo podman || echo docker)}
PROJECT=${PROJECT:-messenger-lab3}
: "${TARGET_INSTANCE_ID:?TARGET_INSTANCE_ID is required}"
for id in $($ENGINE ps -q --filter "label=com.docker.compose.project=$PROJECT" --filter "label=com.docker.compose.service=api"); do
if [ "$($ENGINE inspect -f '{{.Config.Hostname}}' "$id")" = "$TARGET_INSTANCE_ID" ]; then
$ENGINE stop -t 10 "$id" >/dev/null
exit 0
fi
done
exit 1