deploy.md: Healthcheck in Quadlet-Unit statt Containerfile (OCI kennt kein HEALTHCHECK)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,11 @@ podman build -t kver .
|
|||||||
Multi-Stage-Build (`Containerfile`): statisches Go-Binary (CGO aus, modernc-
|
Multi-Stage-Build (`Containerfile`): statisches Go-Binary (CGO aus, modernc-
|
||||||
SQLite ist pures Go), Laufzeit-Image ist Alpine mit unprivilegiertem Nutzer.
|
SQLite ist pures Go), Laufzeit-Image ist Alpine mit unprivilegiertem Nutzer.
|
||||||
|
|
||||||
|
Die Warnung `HEALTHCHECK is not supported for OCI image format` ist erwartbar:
|
||||||
|
Podman baut OCI-Images, dort gibt es kein eingebettetes HEALTHCHECK. Der
|
||||||
|
Healthcheck kommt stattdessen aus der Quadlet-Unit (s.u.); alternativ
|
||||||
|
`podman build --format=docker` oder `podman run --health-cmd=...`.
|
||||||
|
|
||||||
## Starten
|
## Starten
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -84,6 +89,10 @@ Image=localhost/kver:latest
|
|||||||
PublishPort=127.0.0.1:8080:8080
|
PublishPort=127.0.0.1:8080:8080
|
||||||
Volume=kver-data:/app/data
|
Volume=kver-data:/app/data
|
||||||
Volume=kver-media:/app/static/media
|
Volume=kver-media:/app/static/media
|
||||||
|
# Healthcheck hier statt im Containerfile: Podman baut standardmäßig
|
||||||
|
# OCI-Images, die kennen kein HEALTHCHECK (daher die Warnung beim Build).
|
||||||
|
HealthCmd=wget -qO /dev/null http://localhost:8080/entry/feed/0
|
||||||
|
HealthInterval=30s
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|||||||
Reference in New Issue
Block a user