# paperless infra (snapshot) These files are a **traceable copy** of what lives in `~/paperless/` on mDock. The live source of truth is on mDock — this directory exists so the configuration is git-readable for the next shift and for audits. If you change the live config on mDock, sync the change here in the same commit. If you change the files here, deploy by: ```bash scp Dockerfile docker-compose.yml mdock:/home/m/paperless/build/Dockerfile # and so on ssh mdock 'cd /home/m/paperless && docker compose up -d --build' ``` The two patched JS files (`setup.js.patched`, `server.js.patched`) live only on mDock in `~/paperless/build/` — they're large and don't belong in the repo. Hashes: | File | mDock path | md5 | |---|---|---| | setup.js.patched | ~/paperless/build/setup.js.patched | `04cb5fbfaed13a5f25612af0b79dd90c` | | server.js.patched | ~/paperless/build/server.js.patched | `eadcbb86048127f2c80632ae77bbc2a0` | See `docs/research/issue-429-paperless-pipeline.md` in `m/otto` for the original pipeline rebuild (issue otto#429). ## SYSTEM_PROMPT deploy mechanism `SYSTEM_PROMPT.txt` is the source of truth. It is a template — the `{{CORRESPONDENTS_LIST}}` placeholder is rendered at deploy time by fetching the live correspondents from Paperless. The live prompt is inside `paperless-ai`'s `/app/data/.env` (volume `paperless_aidata`) as the backtick-delimited `SYSTEM_PROMPT=\`…\`` block. Deploy with `push_system_prompt.py`: ```bash python3 push_system_prompt.py # dry run — diff only python3 push_system_prompt.py --apply # write + restart paperless-ai ``` The script filters recipient-only names (Matthias / Mathias Siebels) out of the rendered list — see `RECIPIENT_EXCLUDE` in the script and the matching rule at the top of the Correspondents section in `SYSTEM_PROMPT.txt`. If you edit either, edit both. The previous live `.env` is kept on mDock as `.env.bak.` next to the new one for rollback.