feat: add --health-check command line switch (#1725)

Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
bugficks 2023-09-16 21:10:00 +02:00 committed by GitHub
parent 79ebad0e19
commit 8e3bde7e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 35 additions and 1 deletions

View file

@ -419,6 +419,17 @@ Environment Variable: WATCHTOWER_WARN_ON_HEAD_FAILURE
Default: auto
```
## Health check
Returns a success exit code to enable usage with docker `HEALTHCHECK`. This check is naive and only returns checks whether there is another process running inside the container, as it is the only known form of failure state for watchtowers container.
!!! note "Only for HEALTHCHECK use"
Never put this on the main container executable command line as it is only meant to be run from docker HEALTHCHECK.
```text
Argument: --health-check
```
## Programatic Output (porcelain)
Writes the session results to STDOUT using a stable, machine-readable format (indicated by the argument VERSION).