Лабораторная 2:Оценка 4
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-10-19 23:09:12 +03:00
parent 65003b6119
commit 3af3a132ca
26 changed files with 1283 additions and 34 deletions
+11
View File
@@ -0,0 +1,11 @@
@echo off
setlocal
cd /d "%~dp0.."
docker compose --env-file .env restart db
if errorlevel 1 exit /b 1
docker compose --env-file .env restart redis
if errorlevel 1 exit /b 1
docker compose --env-file .env restart api
if errorlevel 1 exit /b 1
powershell -NoProfile -Command "$deadline=(Get-Date).AddSeconds(90); do { try { $r=Invoke-WebRequest -UseBasicParsing http://localhost:8080/health/ready -TimeoutSec 2; if ($r.StatusCode -eq 200) { exit 0 } } catch {}; Start-Sleep -Seconds 2 } while ((Get-Date) -lt $deadline); exit 1"
exit /b %ERRORLEVEL%
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose --env-file .env restart db
docker compose --env-file .env up -d --wait db
docker compose --env-file .env restart redis
docker compose --env-file .env up -d --wait redis
docker compose --env-file .env restart api
deadline=$(( $(date +%s) + 90 ))
until curl --fail --silent http://localhost:8080/health/ready >/dev/null; do
if [ "$(date +%s)" -ge "$deadline" ]; then
echo "API did not become ready within 90 seconds" >&2
exit 1
fi
sleep 2
done