Files
portfolio/docs/TESTING_AND_DEPLOYMENT.md
Cursor Agent 9839d1ba7c Checkpoint before follow-up message
Co-authored-by: dennis <dennis@konkol.net>
2026-01-12 14:49:44 +00:00

53 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Testing & Deployment (Gitea → Docker → Nginx Proxy Manager)
## Ziel
- **Production**: Branch `production` → Container `portfolio-app``dk0.dev` (Port `3000`)
- **Testing**: Branch `testing` → Container `portfolio-app-testing``testing.dk0.dev` (Port `3002`)
Beide Stacks laufen parallel und sind komplett getrennt (eigene Postgres/Redis/Volumes).
## DNS / Nginx Proxy Manager
### DNS
- Setze `A` (oder `CNAME`) Records:
- `dk0.dev` → dein Server
- `testing.dk0.dev` → dein Server
### Nginx Proxy Manager
Lege zwei Proxy Hosts an:
- **`dk0.dev`**
- Forward Hostname/IP: `127.0.0.1` (oder Server-IP)
- Forward Port: `3000`
- **`testing.dk0.dev`**
- Forward Hostname/IP: `127.0.0.1` (oder Server-IP)
- Forward Port: `3002`
Dann SSL Zertifikate (Lets Encrypt) aktivieren.
## Gitea Workflows
- `production` push → `.gitea/workflows/production-deploy.yml`
- `testing` push → `.gitea/workflows/dev-deploy.yml` (umbenannt im Namen, Inhalt ist Testing)
### Benötigte Variables (Gitea)
- `NEXT_PUBLIC_BASE_URL_PRODUCTION` = `https://dk0.dev`
- `NEXT_PUBLIC_BASE_URL_TESTING` = `https://testing.dk0.dev`
- optional: `MY_EMAIL`, `MY_INFO_EMAIL`, `LOG_LEVEL`, `N8N_WEBHOOK_URL`, `N8N_API_KEY`
### Benötigte Secrets (Gitea)
- `MY_PASSWORD`
- `MY_INFO_PASSWORD`
- `ADMIN_BASIC_AUTH` (z.B. `admin:<starkes_passwort>`)
- optional: `N8N_SECRET_TOKEN`
## Docker Compose Files
- Production: `docker-compose.production.yml` (Port 3000)
- Testing: `docker-compose.testing.yml` (Port 3002)
Wenn du “dev” nicht mehr brauchst, kannst du den Branch einfach nicht mehr benutzen.