1576fa190b
docker-compose.dev.yml (Nginx senza SSL, l'installazione on-premise): default false. .env.example: default true documentato, con la spiegazione di quando va a false. La lettura in src/frontend/flask_app/config.py è del lotto B2, non ancora landata: qui si documenta e si predispone solo la variabile lato deploy. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
92 lines
3.7 KiB
Bash
92 lines
3.7 KiB
Bash
# ===========================
|
|
# TieMeasureFlow Configuration
|
|
# ===========================
|
|
|
|
# --- Database ---
|
|
# DB_PASSWORD e DB_ROOT_PASSWORD (sezione Docker sotto): in produzione (docker-compose.yml)
|
|
# sono obbligatorie, senza default — `docker compose config` si rifiuta se mancano.
|
|
DB_HOST=localhost
|
|
DB_PORT=3306
|
|
DB_NAME=tiemeasureflow
|
|
DB_USER=tmflow
|
|
DB_PASSWORD=change_me_in_production
|
|
|
|
# --- Server ---
|
|
# SERVER_SECRET_KEY: in produzione obbligatoria, senza default, e il server rifiuta
|
|
# di avviarsi se resta uguale al valore committato qui sotto.
|
|
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_SECRET_KEY: in produzione obbligatoria, senza default, e il client rifiuta
|
|
# di avviarsi se resta uguale al valore committato qui sotto.
|
|
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
|
|
|
|
# --- Deploy (introdotte dalla revisione del 21/09/2026) ---
|
|
# Dominio pubblico dell'installazione, usato nelle rule Traefik di
|
|
# docker-compose.yml (produzione). Obbligatorio, senza default.
|
|
APP_DOMAIN=
|
|
# Quanti hop di reverse proxy fidati ci sono davanti al server (Nginx o
|
|
# Traefik): serve a calcolare l'IP reale del tablet per il rate limiter.
|
|
TRUSTED_PROXY_COUNT=1
|
|
# Numero di worker Uvicorn del server. Il Dockerfile ne avvia 4 di default
|
|
# indipendentemente da questa variabile; impostarla esplicitamente per farla
|
|
# coincidere se si cambia il numero di worker nell'immagine.
|
|
WEB_CONCURRENCY=1
|
|
# Cookie di sessione Flask con flag Secure. true di default (richiede HTTPS,
|
|
# come dietro Traefik in docker-compose.yml). Le installazioni on-premise su
|
|
# rete LAN in HTTP semplice (docker-compose.dev.yml, Nginx senza SSL) la
|
|
# impostano a false, altrimenti il browser non rimanda mai indietro il cookie.
|
|
SESSION_COOKIE_SECURE=true
|
|
# Timeout (secondi) di un'esecuzione del worker di visione.
|
|
VISION_RUN_TIMEOUT_S=100
|
|
# Quante esecuzioni di visione in parallelo accetta il worker.
|
|
VISION_MAX_CONCURRENCY=2
|
|
|
|
# --- Docker ---
|
|
# DB_ROOT_PASSWORD: in produzione (docker-compose.yml) obbligatoria, senza default.
|
|
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
|