Brings up the documented target architecture as a docker-compose stack — a modular monolith with the Ghidra step split into its own async worker. - worker/: RQ queue (lazy redis import) + run_acquisition task (Job status queued→started→finished/failed, drives ams.acquire with sink=db) - Job model + JobOut schema; Snapshot.data is JSONB on Postgres - POST/GET /jobs: stream an upload to a shared volume, enqueue, poll status - docker/api.Dockerfile (slim) + docker/worker.Dockerfile (JDK21 + Ghidra fetched at build, overridable via GHIDRA_URL) + docker-compose.yml - ghidra.py: AMS_GHIDRA_SCRIPTS override for in-container script path - pyproject: [worker] extra (rq/redis/psycopg), python-multipart in [api] - tests: 4 new (task success/failure + endpoint enqueue/503) -> 22/22 Verified: API image builds, container serves /health + /ui + /jobs; compose config validates. Worker image (downloads ~1 GB Ghidra) not built here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
38 lines
853 B
TOML
38 lines
853 B
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "ams"
|
|
version = "0.1.0"
|
|
description = "Aidem Media engine-surface snapshot diffing + catalog (Piklib/BlooMoo)"
|
|
requires-python = ">=3.10"
|
|
dependencies = []
|
|
|
|
[project.optional-dependencies]
|
|
api = [
|
|
"fastapi>=0.110",
|
|
"uvicorn[standard]>=0.27",
|
|
"sqlalchemy>=2.0",
|
|
"pydantic>=2.6",
|
|
"python-multipart>=0.0.9", # file uploads for the acquisition endpoint
|
|
]
|
|
acquire = [
|
|
"ppdeep>=20200505", # pure-Python ssdeep, for fuzzy/near-duplicate hashing (optional)
|
|
]
|
|
worker = [
|
|
"rq>=1.16",
|
|
"redis>=5.0",
|
|
"psycopg[binary]>=3.1", # Postgres driver for the shared catalog DB
|
|
]
|
|
dev = [
|
|
"pytest>=8",
|
|
"httpx>=0.27",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = ["ams*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|