docs: restructure docs to diataxis and finalize DOCS-RESTRUCTURE-001
This commit is contained in:
80
docs/howto-docker-lokal.md
Normal file
80
docs/howto-docker-lokal.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# Docker lokal
|
||||
|
||||
Letzte Aktualisierung: 2026-03-06
|
||||
|
||||
## 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
|
||||
|
||||
## Start in 4 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
|
||||
Reference in New Issue
Block a user