Files
boc/iom/STAGING.md
T
Bernt bae705aa97 ARCHITECTURE: NFC roadmap, edge AI, audit logging
- Add NFC ePassport roadmap (ICAO 9303, eIDAS)
- Add TensorFlow.js edge face detection (BlazeFace)
- Add structured audit logger (GDPR-compliant)
- Risk scoring support

Part of KYC Apple Native UX v1.1.0
2026-06-29 16:24:48 +00:00

2.3 KiB

Staging Environment

Produktionslik staging-miljö för testning


Snabbstart

# 1. Starta staging
docker-compose -f docker-compose.staging.yml up -d

# 2. Kör tester
./scripts/test_staging.sh

# 3. Verifiera
./scripts/verify_staging.sh

Konfiguration

docker-compose.staging.yml

version: '3.8'

services:
  postgres:
    image: postgis/postgis:15-3.3
    environment:
      POSTGRES_DB: iom_staging
      POSTGRES_USER: iom
      POSTGRES_PASSWORD: staging_s…
    ports:
      - "5433:5432"

  redis:
    image: redis:7-alpine
    ports:
      - "6380:6379"

  api:
    build: .
    environment:
      DATABASE_URL: postgresql://iom:staging_s…@postgres:5432/iom_staging
      REDIS_URL: redis://redis:6379/0
      ENVIRONMENT: staging
    ports:
      - "8001:8000"
    depends_on:
      - postgres
      - redis

Testscenario

1. Health Check

curl http://localhost:8001/health

2. Auth Flow

# Registrera
curl -X POST http://localhost:8001/auth/register \
  -d '{"username": "test", "password": "test", "role": "admin"}'

# Login
curl -X POST http://localhost:8001/auth/login \
  -d '{"username": "test", "password": "test"}'

# Använd token
curl -H "Authorization: Bearer <token>" http://localhost:8001/taxonomy/domains

3. CRUD Flow

# Skapa observation
curl -X POST http://localhost:8001/observations \
  -H "Authorization: Bearer <token>" \
  -d '{"goid": "BYG-FAC-WIN-GLA-0001", "condition": 3}'

# Hämta
curl http://localhost:8001/observations/OBS-001 \
  -H "Authorization: Bearer <token>"

4. AI Pipeline

# Analysera bild
curl -X POST http://localhost:8001/ai/analyze-image \
  -H "Authorization: Bearer <token>" \
  -F "image=@test.jpg"

5. Decision Intelligence

# Impact score
curl -X POST http://localhost:8001/decisions/impact \
  -H "Authorization: Bearer <token>" \
  -d '{"defect_code": "6200", "condition": 4}'

Verifiering

Automatiska tester

./scripts/test_staging.sh

Manuell checklista

  • API svarar
  • Auth fungerar
  • Database persistent
  • AI pipeline körs
  • Decision engine svarar
  • Sync fungerar
  • Monitoring visar data
  • Loggar skrivs

Nästa steg

Efter staging-verifiering:

  1. Produktionsdeployment
  2. Monitoring
  3. Backup-verifiering