1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/docs/healthcheck.md

20 lines
715 B
Markdown
Raw Normal View History

2018-10-04 14:59:57 +02:00
# Health check
2018-10-08 08:23:20 +02:00
imgproxy comes with a built-in health check HTTP endpoint at `/health`.
`GET /health` returns an HTTP Status of `200 OK` if the server has been successfully started.
2018-10-08 08:23:20 +02:00
You can use this for readiness/liveness probes when deploying with a container orchestration system such as Kubernetes.
2020-02-04 13:48:33 +02:00
## imgproxy health
imgproxy provides an `imgproxy health` command that makes an HTTP request to the health endpoint based on the `IMGPROXY_BIND` and `IMGPROXY_NETWORK` configs. It exits with `0` when the request is successful and with `1` otherwise. The command is handy to use with Docker Compose:
2020-02-04 13:48:33 +02:00
```yaml
healthcheck:
test: [ "CMD", "imgproxy", "health" ]
timeout: 10s
interval: 10s
retries: 3
```