feat: complete lab 7 grade 3 security controls
This commit is contained in:
@@ -8,6 +8,9 @@ for container in $(docker compose --project-name highload-lab7 --env-file .env -
|
||||
if [ "$hostname" = "$TARGET_INSTANCE_ID" ]; then
|
||||
# Only containers from this Compose project's api service are eligible.
|
||||
docker stop --timeout 8 "$container" >/dev/null
|
||||
if [ -n "${FAILOVER_EVIDENCE_FILE:-}" ]; then
|
||||
docker inspect -f '{{.Name}} {{.State.Status}}' "$container" >> "$FAILOVER_EVIDENCE_FILE"
|
||||
fi
|
||||
printf 'Stopped API instance %s\n' "$hostname"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user