Files
portfolio/docs/OPERATIONS.md
Cursor Agent 6c60415b8c docs: add consolidated operations guide
Co-authored-by: dennis <dennis@konkol.net>
2026-01-15 10:08:27 +00:00

98 lines
2.1 KiB
Markdown

# Operations Guide (Dev, Texts, Testing, Deployment)
## Where do I update texts?
### 1) UI texts (recommended default)
- **English**: `messages/en.json`
- **Deutsch**: `messages/de.json`
These are loaded via `next-intl` and are the source of truth for **labels, headings, buttons, validation messages** etc.
### 2) Page content via CMS (optional overrides)
Some sections support a CMS override via `/api/content/page` (falls back to `messages/*` automatically):
- `home-hero`
- `home-about`
- `home-contact`
If your DB/CMS tables are not available, the site will **not crash** and will keep showing the `messages/*` content.
## Local development
### Requirements
- Node.js 18+
- Docker (optional but recommended for DB/Redis)
### Install
```bash
npm ci
```
### Run (recommended)
```bash
npm run dev
```
### Run without Docker (no DB/Redis)
```bash
npm run dev:simple
```
### Run plain Next.js dev server
```bash
npm run dev:next
```
### Environment
Copy `env.example``.env.local` and adjust.
## Testing
### Unit tests (Jest)
```bash
npm run test
```
### E2E tests (Playwright)
```bash
npm run test:e2e
```
### Useful subsets
```bash
npm run test:hydration
npm run test:critical
```
## Deployment overview
### Branches
- `dev` → staging/dev environment
- `production` → live environment
Deployments are driven by CI workflows in `.gitea/workflows/`.
### Health checks
- `/api/health`
## Nginx Proxy Manager (high level)
Create proxy hosts for your domains pointing to the respective ports.
If you see `421 Misdirected Request`, make sure the reverse proxy forwards `Host` properly and consider forcing `proxy_http_version 1.1`.
## Gitea variables/secrets (high level)
Minimum required secrets/variables depend on which features you enable, but typical production/staging need:
- Base URLs (per environment)
- Admin auth/session secrets
- Email credentials
- Optional n8n webhook secret/token
## Troubleshooting
### “docker compose not found”
Use `npm run dev:simple` or install Docker.
### Prisma migrations / existing DB
If you introduce migrations into an existing DB, baseline/resolve the initial migration once to avoid “table already exists” issues.