add readme with docs

This commit is contained in:
Jonas Leder 2025-01-12 18:20:22 +01:00
commit 25ddc0b8b7

23
Readme.md Normal file
View file

@ -0,0 +1,23 @@
# Docker Hub ratelimit exporter
This service exposes the current pull limit from docker hub as prometheus metric.
## Metrics
| Name | Description |
| --- | --- |
| dockerhub_limit_max_requests | Maximum number of pulls a user can do ( e.g. 100 for unauthorized users ) |
| dockerhub_limit_remaining_requests | Currently remaining pulls |
## Configuration
The configuration can be either done using a `.env` variable or though environment variables.
| ENV Variable | Description |
| CHECK_INTERVAL | Interval in seconds to fetch the current limit |
| DOCKER_USERNAME | Login to docker hub, for checking a users limit |
| DOCKER_PASSWORD | Login to docker hub, for checking a users limit |
| PROMETHEUS_AUTH_USERNAME | Basic auth username for prometheus |
| PROMETHEUS_AUTH_PASSWORD | Basic auth password for prometheus |
| TLS_CERT | TLS Certificate for Webserver |
| TLS_KEY | TLS Private key for Webserver |