1
0
Files
breadcrumb-the-shire/docs/howto-docker-lokal.md
fs 0c78dc4355 chore(setup): track config.php directly, slim README to setup checklist
config/config.php was gitignored and devs had to copy it from
config/config.php.example on every fresh clone. Since the bootstrap
config reads everything from .env via $envString() / $envInt() /
$envBool() defaults, there is nothing developer-specific in the file —
the cp step was dead ceremony.

- Remove config/config.php from .gitignore and track it directly
- Delete config/config.php.example
- Drop the example-existence + per-doc reference checks from
  bin/docs-drift-check.sh; add a legacy-pattern check that flags
  any new mention of the removed example file
- Update ConfigContractsTest to require config.php and forbid the
  example
- Clean stale references in CLAUDE.md, README.md, six docs files,
  and the core-guardrails skill

Same commit slims README down from 294 to 47 lines: one setup
checklist (now 3 commands instead of 4), the seeded login table,
the three quality-gate commands, and pointers to CLAUDE.md and
docs/index.md for everything else.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 08:37:45 +02:00

82 lines
1.5 KiB
Markdown

# Docker lokal
Letzte Aktualisierung: 2026-04-01
## Ziel
Diese Anleitung bringt die Anwendung lokal schnell und stabil zum Laufen.
## Voraussetzungen
- Docker Desktop (oder Docker Engine + Compose)
- Port `8080` (App) und `8081` (phpMyAdmin) sind frei
- Nginx-only Setup: `.htaccess` wird nicht ausgewertet
## Start in 5 Schritten
1. ENV-Datei anlegen:
```bash
cp .env.example .env
```
2. Container bauen und starten:
```bash
docker compose up --build -d
```
3. Anwendung öffnen:
- App: `http://localhost:8080`
- phpMyAdmin: `http://localhost:8081`
4. Logs prüfen (optional):
```bash
docker compose logs -f nginx php
```
## Security Header in Dev
Der lokale Nginx liefert bewusst dieselbe Security-Header-Baseline wie Produktion,
mit einer Ausnahme:
- Kein `Strict-Transport-Security` (HSTS) im Dev-HTTP-Setup.
Aktive Header in Dev:
- `X-Content-Type-Options: nosniff`
- `X-Frame-Options: SAMEORIGIN`
- `Referrer-Policy: strict-origin-when-cross-origin`
- `Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()`
- `X-Permitted-Cross-Domain-Policies: none`
## Nützliche Befehle
Neustart:
```bash
docker compose restart nginx php
```
Stoppen:
```bash
docker compose down
```
Scheduler-Logs:
```bash
docker compose logs -f scheduler
```
## Häufige lokale Probleme
- Änderungen werden nicht sichtbar:
- `docker compose restart nginx php`
- Datenbank startet nicht:
- DB-Container-Logs prüfen: `docker compose logs -f db`
- Port-Konflikt:
- in `docker-compose.yml` lokale Port-Mappings anpassen