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:
co-authored by
Claude Opus 5.5
parent
a68fb94b61
commit
0ec5714676
@@ -11,7 +11,7 @@
|
||||
- **Projekt**: mozdIT Bt. weboldal (websitedev)
|
||||
- **Plane workspace**: `developments` — `pm.llmdev.mozdit.hu`
|
||||
- **Plane MCP**: kizárólag a `plane-developments_*` eszközöket használd; a `priws` workspace nem ehhez a projekthez tartozik.
|
||||
- **Stack**: Next.js 15, React 19, TypeScript, Tailwind CSS 4, Payload CMS (self-hosted, `/admin`), MongoDB, Winston
|
||||
- **Stack**: Next.js 15, React 19, TypeScript, Tailwind CSS 4, Payload CMS (self-hosted, `/admin`), PostgreSQL (MITHOME-136), Winston
|
||||
- **Fő könyvtár**: `proto/` — **minden parancsot innen futtatunk**
|
||||
|
||||
---
|
||||
@@ -60,7 +60,7 @@ websitedev/
|
||||
│ ├── content/ # RÉGI JSON rendszer — csak migrációs seed + teszt-fixture (MITHOME-91/93/96)
|
||||
│ │ ├── common.json
|
||||
│ │ └── pages/
|
||||
│ ├── lib/ # payload-content.ts (Local API adapter), MongoDB health-check, Logger
|
||||
│ ├── lib/ # payload-content.ts (Local API adapter), content-transfer, Logger
|
||||
│ ├── config/ # Statikus site konfiguráció
|
||||
│ └── types/ # TypeScript típusok
|
||||
├── docs/ # Projekt dokumentáció (Magyar)
|
||||
@@ -80,8 +80,8 @@ websitedev/
|
||||
## Környezeti változók
|
||||
|
||||
Szükséges változók (`.env` és `proto/.env.local`):
|
||||
- `MONGODB_URI` — MongoDB connection string
|
||||
- `MONGODB_DB` — Adatbázis neve (default: `mozdit`)
|
||||
- `DATABASE_URI` — PostgreSQL connection string (a staging/prod compose a `POSTGRES_PASSWORD`-ből állítja össze; MITHOME-136)
|
||||
- `POSTGRES_USER` / `POSTGRES_PASSWORD` — staging/production: a `mozdit_web` adatbázis felhasználója
|
||||
- `NEXT_PUBLIC_SITE_URL` — Publikus site URL
|
||||
- `NEXT_PUBLIC_WEBMAIL_URL` — Webmail service URL
|
||||
- `NEXT_PUBLIC_CONTACT_EMAIL` — Kapcsolati email cím
|
||||
@@ -93,7 +93,7 @@ Szükséges változók (`.env` és `proto/.env.local`):
|
||||
|
||||
## API struktúra
|
||||
|
||||
- `GET /api/health` — Rendszer állapot + MongoDB kapcsolat ellenőrzés
|
||||
- `GET /api/health` — Rendszer állapot (build- és környezetazonosító)
|
||||
- Minden endpoint egységes válasz formátumban: `{ success, data, error }`
|
||||
- Rate limiting érzékeny endpoint-okon (pl. `/api/contact`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user