Fix AI env passthrough and health check key mismatch
CI / Lint & Format (push) Failing after 11s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 7s
CI / Docker Build (push) Has been skipped

- docker-compose.prod.yml: add env_file to inject full .env into backend
  container (AI_ENABLED, AI_PROVIDER, OPENROUTER_API_KEY, etc. were missing)
- Config.tsx: fix health check key from 'anthropic' to 'ai'
  (backend returns checks.ai, not checks.anthropic)
This commit is contained in:
2026-06-25 08:16:28 -04:00
parent 342cb30657
commit f5de66f848
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -16,6 +16,8 @@ services:
user: "1000:1000"
ports:
- "${BACKEND_PORT:-8001}:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://imago:imago@db:5432/imago
REDIS_URL: redis://redis:6379/0
+1 -1
View File
@@ -122,7 +122,7 @@ export default function Config() {
<ConfigRow label="Base de données" value={health?.checks?.database?.status === 'ok' ? 'PostgreSQL — Connecté' : 'Non connecté'} readOnly />
<ConfigRow label="Redis" value={health?.checks?.redis?.status === 'ok' ? 'Redis 7 — Connecté' : 'Non connecté'} readOnly />
<ConfigRow label="OCR" value={health?.checks?.tesseract?.status === 'ok' ? 'Tesseract — Actif' : 'Non disponible'} readOnly />
<ConfigRow label="AI Vision" value={health?.checks?.anthropic?.status === 'ok' ? 'Configuré' : 'Non configuré'} readOnly />
<ConfigRow label="AI Vision" value={health?.checks?.ai?.status === 'ok' ? 'Configuré' : 'Non configuré'} readOnly />
</div>
</section>
</PageLayout>