2025-11-08 12:41:48 +01:00
2025-11-07 21:03:43 +01:00
2025-11-08 12:41:48 +01:00
2025-10-09 18:51:07 +02:00
2025-11-08 12:41:20 +01:00
2025-10-18 20:59:50 +02:00

Docker Repository Query Service

A FastAPI-based service that monitors Docker repositories (Docker Hub and GitHub Container Registry) for new image versions and sends notifications when updates are detected.

Features

  • Multi-Registry Support: Queries both Docker Hub and GitHub Container Registry (GHCR)
  • Version Tracking: Maintains local state of latest known versions in MySQL
  • Automatic Notifications: Sends alerts when new versions are detected
  • Prometheus Metrics: Built-in request monitoring
  • Scheduled Queries: Designed to be called by external schedulers (cron, Kubernetes CronJob, etc.)

Use Case

This service is ideal for:

  • Monitoring self-hosted applications for updates
  • Automating update notifications for Docker-based infrastructure
  • Tracking specific image tags across different registries

Prerequisites

  • Python 3.8+
  • MySQL database
  • Required Python packages (see Installation)

Installation

pip install -r requirements.txt

Running the Application

python main.py

This starts two servers:

  • Main API: http://0.0.0.0:5000
  • Metrics Server: http://0.0.0.0:9000

API Endpoints

Health Check

GET /health

Returns 200 status code if the service is running.

Check Suwayomi Updates

GET /suwayomi

Queries GitHub Container Registry for the latest stable version of Suwayomi/Tachidesk.

Response:

  • 200 OK: New version detected and notification sent
  • 204 No Content: No new version available
  • 500 Internal Server Error: Query or database error

Registry: GitHub Container Registry (ghcr.io) Repository: Suwayomi/tachidesk Tag: stable

Check Pi-hole Updates

GET /pihole

Queries Docker Hub for the latest version of Pi-hole.

Response:

  • 200 OK: New version detected and notification sent
  • 204 No Content: No new version available
  • 500 Internal Server Error: Query or database error

Registry: Docker Hub Repository: pihole/pihole Tag: latest

Monitoring

Prometheus Metrics

Prometheus metrics are exposed on port 9000 and include:

  • HTTP request counters by method, path, and status code
  • Success/failure rates for version checks

Access metrics at: http://0.0.0.0:9000/metrics

Description
Get updates about new docker image versions
Readme 103 KiB
Languages
Python 97%
Dockerfile 3%