mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 21:56:33 +00:00
097811a67b
- Pin all deps; h11==0.16.0 (CVE-2025-43859), python-multipart>=1.3.1 (CVE-2026-28356), PyJWT==2.12.1
- Add HMAC JWT verification (require_auth FastAPI dependency, JWT_SECRET-gated)
- Fix TokenManager._refresh() to use ADMIN_API_URL instead of ANNOTATIONS_URL
- Rename POST /detect → POST /detect/image (image-only, rejects video files)
- Replace global SSE stream with per-job SSE: GET /detect/{media_id} with event replay buffer
- Apply require_auth to all 4 protected endpoints
- Fix on_annotation/on_status closure to use mutable current_id for correct post-upload event routing
- Add non-root appuser to Dockerfile and Dockerfile.gpu
- Add JWT_SECRET to e2e/docker-compose.test.yml and run-tests.sh
- Update all e2e tests and unit tests for new endpoints and HMAC token signing
- 64/64 tests pass
Made-with: Cursor
81 lines
1.6 KiB
YAML
81 lines
1.6 KiB
YAML
name: detections-e2e
|
|
|
|
services:
|
|
mock-loader:
|
|
build: ./mocks/loader
|
|
volumes:
|
|
- ./fixtures:/models
|
|
networks:
|
|
- e2e-net
|
|
|
|
mock-annotations:
|
|
build: ./mocks/annotations
|
|
networks:
|
|
- e2e-net
|
|
|
|
detections:
|
|
profiles:
|
|
- cpu
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
depends_on:
|
|
- mock-loader
|
|
- mock-annotations
|
|
environment:
|
|
LOADER_URL: http://mock-loader:8080
|
|
ANNOTATIONS_URL: http://mock-annotations:8081
|
|
JWT_SECRET: test-secret-e2e-only
|
|
volumes:
|
|
- ./fixtures/classes.json:/app/classes.json
|
|
- ./fixtures:/media
|
|
- ./logs:/app/Logs
|
|
shm_size: 512m
|
|
mem_limit: 4g
|
|
networks:
|
|
- e2e-net
|
|
|
|
detections-gpu:
|
|
profiles:
|
|
- gpu
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile.gpu
|
|
runtime: nvidia
|
|
depends_on:
|
|
- mock-loader
|
|
- mock-annotations
|
|
environment:
|
|
LOADER_URL: http://mock-loader:8080
|
|
ANNOTATIONS_URL: http://mock-annotations:8081
|
|
JWT_SECRET: test-secret-e2e-only
|
|
volumes:
|
|
- ./fixtures/classes.json:/app/classes.json
|
|
- ./fixtures:/media
|
|
- ./logs:/app/Logs
|
|
networks:
|
|
e2e-net:
|
|
aliases:
|
|
- detections
|
|
|
|
e2e-runner:
|
|
profiles:
|
|
- cpu
|
|
- gpu
|
|
build: .
|
|
depends_on:
|
|
- mock-loader
|
|
- mock-annotations
|
|
environment:
|
|
JWT_SECRET: test-secret-e2e-only
|
|
volumes:
|
|
- ./fixtures:/media
|
|
- ./results:/results
|
|
networks:
|
|
- e2e-net
|
|
command: ["pytest", "--csv=/results/report.csv", "-v"]
|
|
|
|
networks:
|
|
e2e-net:
|
|
driver: bridge
|