лаба 4 на оценку 5

This commit is contained in:
2026-10-30 12:27:49 +03:00
parent 7860d81fa1
commit f9444a3965
59 changed files with 4696 additions and 90 deletions
+9 -1
View File
@@ -9,7 +9,15 @@ cd "$project_root"
env_file=${ENV_FILE:-.env}
matched_container=
for container_id in $(docker compose --env-file "$env_file" ps -a -q api); do
compose() {
if [ -f "$env_file" ]; then
docker compose --env-file "$env_file" "$@"
else
docker compose "$@"
fi
}
for container_id in $(compose ps -a -q api); do
instance_id=$(docker inspect --format '{{.Config.Hostname}}' "$container_id")
if [ "$instance_id" = "$TARGET_INSTANCE_ID" ]; then
if [ -n "$matched_container" ]; then