feat: add OCR service container (refs #64) #72

Merged
egullickson merged 5 commits from issue-64-ocr-container-setup into main 2026-02-01 20:49:52 +00:00
Showing only changes of commit 99fbf2bbb7 - Show all commits

View File

@@ -198,7 +198,8 @@ jobs:
# Check if service has a healthcheck defined
has_healthcheck=$(docker inspect --format='{{if .Config.Healthcheck}}true{{else}}false{{end}}' $service 2>/dev/null || echo "false")
if [ "$has_healthcheck" = "true" ]; then
for i in 1 2 3 4 5 6 7 8 9 10; do
# 24 attempts x 10 seconds = 4 minutes max wait (backend with fresh migrations can take ~3 min)
for i in $(seq 1 24); do
health=$(docker inspect --format='{{.State.Health.Status}}' $service 2>/dev/null || echo "unknown")
if [ "$health" = "healthy" ]; then
echo "OK: $service is healthy"
@@ -208,13 +209,13 @@ jobs:
docker logs $service --tail 50 2>/dev/null || true
exit 1
fi
if [ $i -eq 10 ]; then
if [ $i -eq 24 ]; then
echo "ERROR: $service health check timed out (status: $health)"
docker logs $service --tail 50 2>/dev/null || true
exit 1
fi
echo "Waiting for $service healthcheck... (attempt $i/10, status: $health)"
sleep 5
echo "Waiting for $service healthcheck... (attempt $i/24, status: $health)"
sleep 10
done
else
echo "SKIP: $service has no healthcheck defined"