{"id":28092376,"url":"https://github.com/harshhome/diun-boost","last_synced_at":"2025-10-26T02:46:01.873Z","repository":{"id":290249004,"uuid":"973817085","full_name":"harshhome/diun-boost","owner":"harshhome","description":"diun-boost automatically generates and updates your DIUN configuration with smart version matching, keeping your container monitoring fast, accurate, and fully automated.","archived":false,"fork":false,"pushed_at":"2025-05-09T10:28:41.000Z","size":36,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T13:11:55.555Z","etag":null,"topics":["automation","diun","docker","docker-compose","monitoring","python","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harshhome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"buy_me_a_coffee":"harshbaldwa"}},"created_at":"2025-04-27T19:49:31.000Z","updated_at":"2025-05-09T10:27:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c44ae65-a3c0-4210-ab63-b6b494af5e9b","html_url":"https://github.com/harshhome/diun-boost","commit_stats":null,"previous_names":["harshhome/diun-boost"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/harshhome/diun-boost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshhome%2Fdiun-boost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshhome%2Fdiun-boost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshhome%2Fdiun-boost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshhome%2Fdiun-boost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshhome","download_url":"https://codeload.github.com/harshhome/diun-boost/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshhome%2Fdiun-boost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272579158,"owners_count":24959056,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","diun","docker","docker-compose","monitoring","python","self-hosted"],"created_at":"2025-05-13T13:07:07.743Z","updated_at":"2025-10-26T02:46:01.796Z","avatar_url":"https://github.com/harshhome.png","language":"Python","funding_links":["https://buymeacoffee.com/harshbaldwa","https://www.buymeacoffee.com/harshbaldwa"],"categories":[],"sub_categories":[],"readme":"# diun-boost  🚀 🐳 📦\n\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/harshhome/diun-boost?style=flat)](https://github.com/harshhome/diun-boost/releases/latest)\n[![Docker Image Size (latest by tag)](https://img.shields.io/docker/image-size/harshbaldwa/diun-boost/latest?style=flat)](https://hub.docker.com/r/harshbaldwa/diun-boost)\n[![GitHub Stars](https://img.shields.io/github/stars/harshhome/diun-boost?style=flat)](https://github.com/harshhome/diun-boost/stargazers)\n[![Docker Pulls](https://img.shields.io/docker/pulls/harshbaldwa/diun-boost?style=flat)](https://hub.docker.com/r/harshbaldwa/diun-boost)\n[![Issues](https://img.shields.io/github/issues/harshhome/diun-boost?style=flat)](https://github.com/harshhome/diun-boost/issues)\n\n[![GitHub Repo](https://img.shields.io/badge/GitHub-Repo-black?logo=github\u0026style=flat)](https://github.com/harshhome/diun-boost)\n[![DockerHub](https://img.shields.io/badge/DockerHub-Repo-blue?logo=docker\u0026style=flat)](https://hub.docker.com/r/harshbaldwa/diun-boost)\n[![Made with Python](https://img.shields.io/badge/Made%20with-Python-yellow?logo=python\u0026style=flat)](https://www.python.org/)\n\n![Unit Tests](https://byob.yarr.is/harshhome/diun-boost/unit-tests)\n![Docker Tests](https://byob.yarr.is/harshhome/diun-boost/docker-tests)\n\nAutomated [DIUN](https://crazymax.dev/diun/) File Provider YAML Generator for Smarter Docker Image Monitoring\n\n## 📄 General Description\n\n**diun-boost** is a ⚡ **utility tool** ⚡ that dynamically generates a `config.yml` file designed to be used with DIUN's [File Provider](https://crazymax.dev/diun/providers/file/).\n\n\u003e *Important*: diun-boost **only generates** the configuration file (`config.yml`) for DIUN. It does **NOT monitor** container updates itself. DIUN will use the generated file to monitor images! 🔍\n\nThis tool simplifies managing large DIUN configurations by automatically creating version-aware watch entries based on your running Docker containers and generate rules that monitors only newer [semver](https://semver.org) tags.\n\n## ✨ Features\n\n### 🧠 Smart Semantic Versioning Support\n\nVersion matching is **depth-aware** — only tags with the **same number of components** (segments) are compared:\n\n- ✅ `1.0.0` matches:\n  - `1.0.1`, `1.1.0`, `2.0.0`\n- ✅ `1.0` matches:\n  - `1.1`, `2.0`\n- ✅ `1.2.3.4` matches:\n  - `1.2.3.5`, `1.2.4.0`, `2.0.0.0`\n- ❌ No match to shorter (`1.0`, `1`) or longer (`1.0.0.1`) tags\n\n\u003e 📏 All segments must match in **depth** and be **equal or greater** in value.\n\n### 🏷️ Arbitrary Prefix Support\n\nSupports any prefix (e.g. `v`, `pg`, `nodejs-`, `redis-`), preserving it in all matches:\n\n- Examples:\n  - `v1.0.0`, `pg13.5.1`, `nodejs-18.16.0`, `nginx1.25.3`\n\n### 🎯 Suffix-Aware Version Comparison\n\nSuffixes and their versions are independently compared:\n\n- A tag like `v1.2.0.12-build12` will match:\n  - `v1.2.0.12-build13` ✅ (same main version, higher suffix version)\n  - `v1.2.0.13-build11` ✅ (higher main version, lower suffix version still okay)\n- Both the **main version** and **suffix version** are evaluated using depth-aware comparison\n\n### ✅ Non-Semver \u0026 Static Tag Matching\n\nTags that don’t follow semantic versioning — like:\n- `latest`, `20240518`, `final-build`, `beta`\n- Are matched **exactly**, no version logic is applied.\n\n### 🔍 Test Regex Live\n👉 Explore the version matching logic and patterns here: [Regex 101 pattern](https://regex101.com/r/u8sAuo/1)\n\n### 🤏 Minimal Setup:\n- Works out of the box using Docker 🐳.\n- Supports linux/amd64 and linux/arm64 architectures.\n- Small and lightweight image (~50MB) 💾\n- No external dependencies required.\n- Built using `python:slim` base image with minimal runtime footprint.\n\n## 🛠️ How to Run\n\n### Using `docker run`\n\n```bash\ndocker run -d \\\n  --name diun-boost \\\n  -e DIUN_YAML_PATH=\"/config/config.yml\" \\\n  -e CRON_SCHEDULE=\"0 */6 * * *\" \\\n  -e LOG_LEVEL=\"INFO\" \\\n  -e WATCHBYDEFAULT=\"false\" \\\n  -e DOCKER_COMPOSE_METADATA=\"false\" \\\n  -v \"$(pwd)/config:/config\" \\\n  -v \"/var/run/docker.sock:/var/run/docker.sock\" \\\n  harshbaldwa/diun-boost:1.3.0\n```\n\n#### Environment Variables\n\n| Variable        | Description                                                                                                                                           | Default Value        |\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|\n| `DIUN_YAML_PATH` | Path to the shared `config.yml` file that DIUN will read.                                                                                               | `/config/config.yml`  |\n| `CRON_SCHEDULE`  | Cron schedule expression to control how often the YAML file is regenerated.                                                                           | `0 */6 * * *`          |\n| `LOG_LEVEL`      | Logging level for diun-boost. Available options: `DEBUG`, `INFO`, `WARNING`, `ERROR`.                                                                  | `INFO`                |\n| `WATCHBYDEFAULT` | Set to `true` to watch **all running containers** by default. \u003cbr\u003e However, any container explicitly labeled with `diun.enable=false` will always be excluded. \u003cbr\u003e If set to `false`, only containers with the label `diun.enable=true` are watched. | `false`               |\n| `DOCKER_COMPOSE_METADATA` | Set to `true` to include Docker Compose metadata in the generated YAML file. \u003cbr\u003e This is useful for identifying containers in a multi-container setup as well as for notifications with DIUN. \u003cbr\u003e If set to `false`, only the container name will be used. | `false`               |\n\n\n#### Volume Mounts\n\n| Mount Path               | Description                                           |\n|----------------------------|-------------------------------------------------------|\n| `/var/run/docker.sock`     | Required for accessing the Docker API from the container. |\n| `$(pwd)/config`            | Local directory to store the generated `config.yml` file.  |\n\n### Using Docker Compose\n\n```yaml\nservices:\n  diun-boost:\n    container_name: diun-boost\n    image: harshbaldwa/diun-boost:1.3.0\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - ./config:/config\n    environment:\n      - DIUN_YAML_PATH=/config/config.yml\n      - CRON_SCHEDULE=0 */6 * * *\n      - LOG_LEVEL=INFO\n      - WATCHBYDEFAULT=false\n      - DOCKER_COMPOSE_METADATA=false\n    restart: unless-stopped\n```\n\n\u003e**🔥 Tip**: Adjust volume mounts to match your environment.\n\n### 📜 Sample Dummy Code for Diun\nExample base `diun.yml` file for DIUN:\n\n```yaml\nwatch:\n  workers: 20\n  schedule: \"2 */6 * * *\"\n\ndefaults:\n  sortTags: semver\n  maxTags: 10\n\nproviders:\n  file:\n    filename: /config/config.yml\n```\n`docker-compose.yml` file for DIUN and **diun-boost**:\n\n```yaml\nservices:\n  diun:\n    container_name: diun\n    image: crazymax/diun:latest\n    volumes:\n      - ./data:/data\n      - ./diun.yml:/diun.yml:ro\n      - ./config:/config:ro\n    environment:\n      - \"TZ=America/New_York\"\n    restart: unless-stopped\n    \n  diun-boost:\n    container_name: diun-boost\n    image: harshbaldwa/diun-boost:1.3.0\n    volumes:\n      - /var/run/docker.sock:/var/run/docker.sock\n      - ./config:/config\n    environment:\n      - DIUN_YAML_PATH=/config/config.yml\n      - CRON_SCHEDULE=0 */6 * * *\n      - LOG_LEVEL=INFO\n      - WATCHBYDEFAULT=false\n      - DOCKER_COMPOSE_METADATA=false\n    restart: unless-stopped\n```\n\n## ❤️ Support This Project\n\nIf you find diun-boost useful, fuel its growth by buying me a coffee!\n\n[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/harshbaldwa)\n\nEvery coffee helps keep open-source alive and thriving! 🚀\n\n## 📜 License\n\nThis project is licensed under the MIT License.\n\n\u003e Made with ❤️ by **Harshvardhan Baldwa** for the homelab and DevOps community!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshhome%2Fdiun-boost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshhome%2Fdiun-boost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshhome%2Fdiun-boost/lists"}