Features: - Add /api/ask endpoint for plain-language audit log queries - Regex-based time/entity extraction (no LLM required for parsing) - LLM-powered narrative summarisation with OpenAI-compatible APIs - Graceful fallback to structured bullet lists when LLM is unavailable - Frontend ask panel with markdown rendering and cited events Production: - Harden Dockerfile: non-root user, gunicorn+uvicorn workers - Add docker-compose.prod.yml with internal networks and health checks - Add nginx reverse proxy with security headers - MongoDB no longer exposed externally in production Tests: - 29 new tests for ask parsing, query building, and endpoint behaviour - Fix conftest monkeypatch for routes.ask events collection Bump version to 1.1.0
31 lines
709 B
YAML
31 lines
709 B
YAML
services:
|
|
mongo:
|
|
image: mongo:7
|
|
container_name: aoc-mongo
|
|
restart: always
|
|
ports:
|
|
- "27017:27017"
|
|
environment:
|
|
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USERNAME}
|
|
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
|
|
volumes:
|
|
- mongo_data:/data/db
|
|
|
|
backend:
|
|
build: ./backend
|
|
# For production, use the pre-built image instead:
|
|
# image: git.cqre.net/cqrenet/aoc-backend:v1.1.0
|
|
container_name: aoc-backend
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
MONGO_URI: mongodb://${MONGO_ROOT_USERNAME}:${MONGO_ROOT_PASSWORD}@mongo:${MONGO_PORT}/
|
|
depends_on:
|
|
- mongo
|
|
ports:
|
|
- "8000:8000"
|
|
|
|
volumes:
|
|
mongo_data:
|