Do SikiandClaude Sonnet 5 1b3ae07811
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s
feat(deploy): staging/production Docker deploy for Payload (MITHOME-97)
Fixes a real, previously-undiscovered build failure and a bigger
architectural gap found while testing an actual `docker build` of
proto/Dockerfile for the first time since the Payload migration:

1. Docker build failure: the (frontend)/[locale] pages use
   generateStaticParams, so `next build` fully prerenders them (SSG) —
   which calls the Payload Local API during the build. With no
   MONGODB_URI/PAYLOAD_SECRET reachable in the build stage, `docker
   build` failed outright ("missing secret key").

2. Bigger problem underneath: even if the build could reach a DB,
   full SSG means a Payload admin edit would NOT appear on the public
   site until a full rebuild + redeploy — directly undermining the
   project's whole reason for migrating to Payload (self-service
   content editing for the client).

Fix (user-confirmed direction: force-dynamic): dropped
generateStaticParams from (frontend)/[locale]/layout.tsx and
[locale]/[slug]/page.tsx, added `export const dynamic = 'force-dynamic'`
to layout.tsx + both page.tsx files. Every request now reads Payload
live — publishing in the admin is visible immediately, and the Docker
build no longer needs any DB connectivity at all (verified: a full
`docker build --target builder` now succeeds with zero env vars set).

Docker/Compose changes:
- docker-compose.staging.yml / docker-compose.prod.yml: wired
  PAYLOAD_SECRET through to the app container (was documented in
  .env.*.example since MITHOME-86 but never actually passed to the
  container — Payload would have refused to start). No fallback,
  same fail-loudly pattern as MONGODB_URI.
- Same two files: added a named `media_data_{staging,prod}` volume
  mounted at /app/media — Payload's local upload storage (Media.ts)
  writes there at the container's runtime cwd; without a volume,
  `deploy.sh`'s `--force-recreate` would silently wipe every uploaded
  logo/image on each deploy.
- docker-compose.dev.yml: was missing PAYLOAD_SECRET entirely (only
  discovered because the same "missing secret key" error reproduces
  there too) — added a dev-only literal value. Media persistence
  already works there via the existing `./proto:/app` bind mount, no
  volume needed. Also dropped the obsolete `version: '3.8'` key
  (compose warns it's ignored).
- DOCKER.md: one-paragraph note on the new PAYLOAD_SECRET requirement
  and where the admin account gets created.

Verified:
- `docker build --target builder` succeeds from a clean context with
  zero environment variables (previously failed).
- `docker build --target runner` + `docker run` against the real dev
  MongoDB (PAYLOAD_SECRET + MONGODB_URI supplied at runtime only):
  /hu, /admin and /api/health all return 200 inside the container;
  confirmed live in the browser that Payload content renders
  correctly end-to-end through the production Next.js server, not
  just `next dev`.
- `docker compose -f docker-compose.{staging,prod,dev}.yml config`
  parses cleanly.
- Full gate green: tsc, lint, proto unit tests (51 passed),
  scripts/pre-deploy-tests.sh (proto tests, tsc, lint, content schema,
  plane-sync — all pass).

deploy.sh itself needs no changes: it already just runs
`docker compose up --build`, and that now works without any
build-time DB wiring.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-11 22:12:01 +02:00
2026-09-11 21:50:00 +02:00

mozdIT Bt. — Weboldal fejlesztés (websitedev)

Modern Next.js weboldal a mozdIT Bt. számára — webtárhely, email- és DNS-szolgáltatás, magyar IT vállalkozás.

Stack

  • Frontend: Next.js 15 (Turbopack), React 19, TypeScript, Tailwind CSS 4
  • CMS: Payload CMS (self-hosted, /admin), MongoDB adapter, draft/publish + verziózás, hu/en lokalizáció
  • Tartalom: Payload Globals/Collections (a korábbi JSON-alapú content rendszer, proto/src/content/, csak a migrációs script forrásaként és teszt-fixture-ként él tovább — MITHOME-91/93)
  • Backend: Next.js API routes, MongoDB
  • Tesztelés: Jest, React Testing Library, Playwright (smoke)
  • Deploy: natív Docker Compose (deploy.sh) + Gitea Actions nélkül, lokálisan vezérelt
  • Monitoring: Winston + Loki, plusz scripts/security-scan.sh (ntfy riasztással)

Gyors indítás

# Fejlesztői szerver
cd proto && npm run dev

# Docker fejlesztői környezet
docker-compose -f docker-compose.dev.yml up -d

# Teljes pre-deploy tesztkészlet
scripts/pre-deploy-tests.sh

Feladatkezelés (Plane)

  • Projekt: MITHOME (workspace: developments)
  • TODO.md: helyi tükör, a Plane az elsődleges forrás
  • Szinkron: node plane-sync.js (Plane → TODO.md)
  • Ticket-azonosítók: MITHOME-XX

Deploy

./scripts/deploy_to_stage_on_local.sh   # staging: teljes tesztkészlet + push + deploy + smoke
./deploy.sh production                  # éles (szerveren, staging ellenőrzése után)

A CMS „Publikálás" gombja szintén commitol + pushol + deployol (csak a beállított környezetre). Részletek: .agent/workflows/deploy.md, docs/helyi-staging-deploy.md.

Tartalomkezelés

A weboldal szövegei és a CMS a proto/src/content/ JSON-fájljaiból jönnek:

proto/src/content/
├── schema.js        # közös séma-validátor (Next + CMS)
├── types.ts         # TypeScript típusok
├── index.ts         # tartalom-betöltő
├── common.json      # közös szövegek (gombok, lábléc, a11y)
└── pages/           # oldalankénti tartalom (home, about, services, …)

Használat:

import { content, getPageContent } from '@/content'
const about = content.pages.about

Dokumentáció

  • Agent-szabályok: .agent/AGENTS.md, .agent/steering/, .agent/workflows/
  • CMS felhasználói útmutató: docs/felhasznaloi-utmutato.md (a CMS-ben a Súgó is ezt rendereli)
  • Plane szinkron: PLANE-SYNC-GUIDE.md
  • Staging deploy: docs/helyi-staging-deploy.md
  • Gitea runner: docs/gitea-runner-telepites.md

Környezetek

Biztonsági monitoring

scripts/security-scan.sh (cron, 5 percenként) kriptominer/backdoor indikátorokat figyel (álcázott folyamatnevek, /tmp/.kworkerd-jellegű maradványok, magas CPU), és találat esetén ntfy push-t küld a st_limidev_security topicra.

S
Description
No description provided
Readme MIT
2.5 MiB
Languages
TypeScript 60.3%
JavaScript 24.8%
HTML 7%
Shell 4.4%
CSS 3%
Other 0.4%