README: Hinweise zu Log-Mount und docker-compose ergänzt
This commit is contained in:
35
README.md
35
README.md
@@ -58,6 +58,41 @@ docker run -p 5000:5000 datumsrechner
|
|||||||
- Gunicorn startet automatisch (siehe Dockerfile)
|
- Gunicorn startet automatisch (siehe Dockerfile)
|
||||||
- Empfohlen für produktiven Einsatz
|
- Empfohlen für produktiven Einsatz
|
||||||
|
|
||||||
|
### Log-Verzeichnis mounten (Logs auf dem Host speichern)
|
||||||
|
|
||||||
|
Um die Logdateien außerhalb des Containers zu speichern, kannst du das log-Verzeichnis mounten:
|
||||||
|
|
||||||
|
**PowerShell-Beispiel:**
|
||||||
|
```powershell
|
||||||
|
docker run -e STATS_PASSWORD=deinPasswort -p 5000:5000 -v ${PWD}/log:/app/log datumsrechner
|
||||||
|
```
|
||||||
|
|
||||||
|
**Mit absolutem Windows-Pfad:**
|
||||||
|
```powershell
|
||||||
|
docker run -e STATS_PASSWORD=deinPasswort -p 5000:5000 -v C:/Users/mbusc/source/repos/datecalc/log:/app/log datumsrechner
|
||||||
|
```
|
||||||
|
|
||||||
|
### docker-compose Beispiel
|
||||||
|
|
||||||
|
Erstelle eine Datei `docker-compose.yml`:
|
||||||
|
```yaml
|
||||||
|
version: '3.8'
|
||||||
|
services:
|
||||||
|
datumsrechner:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "5000:5000"
|
||||||
|
environment:
|
||||||
|
- STATS_PASSWORD=deinPasswort
|
||||||
|
volumes:
|
||||||
|
- ./log:/app/log
|
||||||
|
```
|
||||||
|
|
||||||
|
Starte mit:
|
||||||
|
```powershell
|
||||||
|
docker-compose up --build
|
||||||
|
```
|
||||||
|
|
||||||
## Entwicklung & Hinweise
|
## Entwicklung & Hinweise
|
||||||
- Die HTML-Templates liegen im Ordner `templates/` (Trennung von Logik und Darstellung)
|
- Die HTML-Templates liegen im Ordner `templates/` (Trennung von Logik und Darstellung)
|
||||||
- Das Projekt ist auf Gitea gehostet: https://gitea.elpatron.me/elpatron/datecalc
|
- Das Projekt ist auf Gitea gehostet: https://gitea.elpatron.me/elpatron/datecalc
|
||||||
|
Reference in New Issue
Block a user