chore: consolidate runtime data layout under single data/ root directory

Migrate all runtime artifacts (database, uploads, VAPID keys, locks, bot state, container workspaces, zip staging) from scattered locations (`var/`, `devplacepy/static/uploads/`) into a unified `data/` directory. Update `config.py` as single source of truth with `DATA_PATHS` registry and `ensure_data_dirs()`, add `devplace migrate-data` CLI command with CRC verification and idempotent relocation, adjust `.dockerignore`, `.env.example`, `.gitignore`, `Dockerfile`, `Makefile`, `README.md`, `AGENTS.md`, `CLAUDE.md`, and all import paths in `attachments.py` to reference `config.UPLOADS_DIR`/`ATTACHMENTS_DIR` instead of computing from `STATIC_DIR`.
This commit is contained in:
2026-06-13 19:06:43 +00:00
parent de745f7a75
commit 1294c95bed
24 changed files with 378 additions and 80 deletions
+7
View File
@@ -39,3 +39,10 @@ services:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${DEVPLACE_DATA_DIR:-/srv/devplace-data}:${DEVPLACE_DATA_DIR:-/srv/devplace-data}
# nginx serves /static/uploads/ straight from disk, so it must read the same
# data dir the app writes. Override the base uploads mount to track the overlay
# default (compose merges service volumes by container target path).
nginx:
volumes:
- ${DEVPLACE_DATA_DIR:-/srv/devplace-data}/uploads:/data/uploads:ro