feat(infra): PostgreSQL in the compose stacks, automatic pre-deploy backups (MITHOME-136)

- staging/prod: postgres:16-alpine per the llmdev Docker spec (healthcheck,
  log and memory limits, no host port); the app builds DATABASE_URI from
  POSTGRES_PASSWORD and waits for a healthy database; MongoDB kept for one
  release (rollback path, transfer source)
- dev: PostgreSQL replaces MongoDB and Mongo Express (host port 5433, checked
  and registered); integration test rewritten with pg
- deploy.sh: pg_dump (and, during the switch, mongodump) before the build
- pg/@types/pg pinned to the adapter's 8.20.0 (one copy, no type clash)
- docs: CLAUDE.md, architecture/testing steering, deploy workflow, DOCKER.md;
  staging switch runbook in the design

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Do Siki
2026-09-29 22:35:56 +02:00
co-authored by Claude Opus 5.5
parent a68fb94b61
commit 0ec5714676
17 changed files with 263 additions and 183 deletions
+2
View File
@@ -61,6 +61,7 @@
"@testing-library/user-event": "^14.5",
"@types/jest": "^29.5",
"@types/node": "^20",
"@types/pg": "8.20.0",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/winston": "^2.4",
@@ -68,6 +69,7 @@
"eslint-config-next": "^16.3.4",
"jest": "^29.7",
"jest-environment-jsdom": "^29.7",
"pg": "8.20.0",
"tailwindcss": "^4",
"tsx": "^4.23.13",
"typescript": "^5",