fix(vision): build fallisce senza VISION_ENGINE_VERSION, healthcheck vero

Un build senza la variabile produceva un'immagine che partiva e
rispondeva "healthy" pur fallendo ogni richiesta, /health incluso: non
c'era un healthcheck a dirlo. Tre correzioni: RUN test -n
"$VISION_ENGINE_VERSION" in Dockerfile.vision dopo l'ARG, fallisce
subito con il comando da lanciare; healthcheck su /health nel servizio
vision di entrambi i compose; VISION_ENGINE_VERSION documentata in
.env.example accanto a VISION_WORKER_URL, che già c'era.

Verificato con docker build reale: senza la variabile fallisce al passo
del test con il messaggio atteso; con la variabile impostata l'immagine
si costruisce, il container parte, e python3 -c
"urllib.request.urlopen('http://localhost:8100/health')" - lo stesso
comando usato nell'healthcheck - risponde 200 con l'engine_version
giusta.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014BBnuACZSCJqXrMYC3LUMU
This commit is contained in:
2026-08-16 19:43:20 +02:00
parent 0bd95367bb
commit 46566ebfa5
4 changed files with 25 additions and 0 deletions
+5
View File
@@ -33,6 +33,11 @@ STATION_SWITCH_ENABLED=0
# --- Vision ---
# Internal address of the vision worker. Never exposed outside tmflow-net.
VISION_WORKER_URL=http://vision:8100
# The pinned VisionSuite commit, stamped into the vision image at build time
# (Dockerfile.vision ARG). Required: `docker compose build vision` fails
# immediately without it. Set with:
# VISION_ENGINE_VERSION=$(git -C vendor/visionsuite rev-parse HEAD)
VISION_ENGINE_VERSION=
# --- File Storage ---
# Resolved against the project root in src/backend/config.py.