Adds a complete deployment surface for production:
Dockerfile multi-stage 3.12-slim build, collectstatic
baked into the image, runs as non-root mnemosyne
uid/gid 1000.
docker/entrypoint.sh dispatches `web | mcp | worker | beat | migrate
| setup | shell` from a single image, so every
service in compose runs the same artifact.
docker-compose.yaml five services: static-init (one-shot copies
statics into the shared volume on every up),
web (gunicorn), mcp (uvicorn), worker (celery),
nginx. External services (Postgres, Neo4j,
RabbitMQ, S3, Memcached, embedder, reranker)
reached over the 10.10.0.0/24 internal network
and configured via mnemosyne/.env.
nginx/mnemosyne.conf reverse proxy: /library/* and /admin/* → web,
/mcp/* → mcp, /static/* → volume, /metrics
internal-network-only (127/8 + RFC1918), /healthz
proxies to /mcp/health for liveness probes.
.gitea/workflows/ CVE scan + image build, image pushed to
git.helu.ca/r/mnemosyne. Trivy scans pyproject
extras (dev/test/lint/docs) and the built image.
pyproject.toml adds [test], [lint], [docs] extras so the CI
pip-compile step has something to resolve.
README documents the bring-up flow (`docker compose run --rm web migrate`,
then `setup`, then `up -d`), day-to-day commands, and the env-var values
that need adjusting for production (DEBUG=False, KVDB_LOCATION pointing
at the external memcached, AWS keys filled in, etc.).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
61 lines
1.4 KiB
TOML
61 lines
1.4 KiB
TOML
[project]
|
|
name = "mnemosyne"
|
|
version = "0.1.0"
|
|
description = "Content-type-aware, multimodal personal knowledge management system"
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"Django>=5.2,<6.0",
|
|
"djangorestframework>=3.14,<4.0",
|
|
"django-neomodel>=0.1,<1.0",
|
|
"neomodel>=5.3,<6.0",
|
|
"neo4j>=5.0,<6.0",
|
|
"celery>=5.3,<6.0",
|
|
"django-storages[boto3]>=1.14,<2.0",
|
|
"django-environ>=0.11,<1.0",
|
|
"psycopg[binary]>=3.1,<4.0",
|
|
"dj-database-url>=2.1,<3.0",
|
|
"shortuuid>=1.0,<2.0",
|
|
"gunicorn>=21.0,<24.0",
|
|
"cryptography>=41.0,<45.0",
|
|
"flower>=2.0,<3.0",
|
|
"pymemcache>=4.0,<5.0",
|
|
"openai>=1.0,<2.0",
|
|
"django-prometheus>=2.3,<3.0",
|
|
# Phase 2: Embedding Pipeline
|
|
"PyMuPDF>=1.24,<2.0",
|
|
"pymupdf4llm>=0.0.17,<1.0",
|
|
"semantic-text-splitter>=0.20,<1.0",
|
|
"tokenizers>=0.20,<1.0",
|
|
"Pillow>=10.0,<12.0",
|
|
"requests>=2.31,<3.0",
|
|
# Phase 5: MCP Server
|
|
"fastmcp>=2.0,<3.0",
|
|
"uvicorn[standard]>=0.30,<1.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"django-debug-toolbar>=4.0,<5.0",
|
|
"docker>=7.0,<8.0",
|
|
]
|
|
test = [
|
|
"pytest>=8.0,<9.0",
|
|
"pytest-django>=4.8,<5.0",
|
|
]
|
|
lint = [
|
|
"ruff>=0.6,<1.0",
|
|
]
|
|
docs = [
|
|
"mkdocs>=1.6,<2.0",
|
|
"mkdocs-material>=9.5,<10.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68.0"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["mnemosyne"]
|