46566ebfa5
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
64 lines
2.1 KiB
Bash
64 lines
2.1 KiB
Bash
# ===========================
|
|
# TieMeasureFlow Configuration
|
|
# ===========================
|
|
|
|
# --- Database ---
|
|
DB_HOST=localhost
|
|
DB_PORT=3306
|
|
DB_NAME=tiemeasureflow
|
|
DB_USER=tmflow
|
|
DB_PASSWORD=change_me_in_production
|
|
|
|
# --- Server ---
|
|
SERVER_HOST=0.0.0.0
|
|
SERVER_PORT=8000
|
|
SERVER_SECRET_KEY=change-this-to-a-random-secret-key
|
|
SERVER_CORS_ORIGINS=http://localhost:5000
|
|
|
|
# --- Client ---
|
|
CLIENT_HOST=0.0.0.0
|
|
CLIENT_PORT=5000
|
|
CLIENT_SECRET_KEY=change-this-to-another-random-secret-key
|
|
API_SERVER_URL=http://localhost:8000
|
|
# Station code this client container belongs to (e.g. ST-001).
|
|
# Each physical tablet/PC deployment must set this unique per-station value.
|
|
# Leave empty only for a single-station all-in-one demo using ST-DEFAULT.
|
|
STATION_CODE=ST-DEFAULT
|
|
# Allow switching station from the URL (?station=CODE) during commissioning, so a
|
|
# single PC can exercise several stations. Leave at 0 in production: on the shop
|
|
# floor the station identity comes from the local install, and measuring against
|
|
# another station's recipes would silently break traceability.
|
|
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.
|
|
# Default "uploads" maps to <project_root>/uploads, mounted as a Docker
|
|
# volume in production.
|
|
UPLOAD_DIR=uploads
|
|
MAX_UPLOAD_SIZE_MB=50
|
|
|
|
# --- Setup Page ---
|
|
SETUP_PASSWORD= # Password per /api/setup, vuoto = disabilitato
|
|
|
|
# --- AI (OpenRouter) ---
|
|
OPENROUTER_API_KEY= # API key per parsing schede tecniche, vuoto = disabilitato
|
|
OPENROUTER_MODEL=anthropic/claude-sonnet-4 # Modello AI da utilizzare
|
|
|
|
# --- Docker ---
|
|
DB_ROOT_PASSWORD=root_password_change_me
|
|
NGINX_PORT=80
|
|
NGINX_SSL_PORT=443
|
|
|
|
# --- HTTPS (Production) ---
|
|
# SSL_CERTFILE=/path/to/cert.pem
|
|
# SSL_KEYFILE=/path/to/key.pem
|