Skip to content

Releases: BattermanZ/DocktorNet

DocktorNet v1.1.0

Choose a tag to compare

@BattermanZ BattermanZ released this 19 Jul 15:23
7730a1d

DocktorNet v1.1.0 adds multi-domain Nginx Proxy Manager support and substantially strengthens reconciliation safety across Docker/Podman agents, NPM, Cloudflare DNS, and Gatus.

Highlights

  • Route several comma-separated public domains through one NPM proxy host.
  • Remove NPM proxy hosts and Cloudflare DNS records safely after a service disappears, while preserving them through the restart grace period.
  • Persist pending external-resource removals so cleanup survives restarts and temporary API failures.
  • Sequence reconciliation per machine so stale background work cannot resurrect removed resources.

Reliability and recovery

  • Skip authoritative snapshot pushes when any configured container source fails or times out.
  • Enumerate Docker/Podman sources concurrently and reject duplicate container names rather than silently merging them.
  • Restore external-resource mappings when services return during the grace period.
  • Recreate NPM and Cloudflare resources deleted out of band.
  • Add Cloudflare request timeouts and shared Retry-After backoff.
  • Treat already-deleted NPM and Cloudflare resources as successful cleanup.
  • Avoid redundant Cloudflare updates and honor Gatus removal grace periods.
  • Chunk large SQLite ID lists to stay below parameter limits.

Security and validation

  • Compare bearer tokens using a constant-time primitive.
  • Hide agent inventory from unauthenticated /healthz responses.
  • Reject empty bearer secrets and sub-second polling intervals.
  • Reject non-canonical label indices and unsafe SSL configurations without a matching certificate.
  • Warn when the server is bound to a non-loopback plaintext address.

Upgrade notes

  • Database migrations 0004_pending_npm_removals.sql and 0005_pending_cf_removals.sql run automatically at startup.
  • NPM proxy hosts and Cloudflare records are now deleted after the removal grace period when their service remains absent.
  • Anonymous /healthz callers receive liveness information only; include the bearer token to retrieve agent inventory.
  • DOCKTORNET_SECRET must be non-empty and DOCKTORNET_POLL_INTERVAL must be at least one second.
  • All DocktorNet Cargo packages now report version 1.1.0.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace — 188 passed, 0 failed

Full changelog: v1.0.0...v1.1.0

v1.0.0

Choose a tag to compare

@BattermanZ BattermanZ released this 02 Jun 09:43
d9d0da8

DocktorNet v1.0.0

First stable release. DocktorNet is a Docker/Podman label-driven reconciler: it reads docktornet.* container labels across your machines and continuously reconciles external state in Nginx Proxy Manager, Cloudflare DNS, and Gatus.

Architecture

  • Agent — lists containers from Docker and Podman sockets, filters to docktornet.* labels, builds a snapshot, and pushes it to the server with bounded exponential backoff. A single agent can serve both Docker and Podman via group_add.
  • Server — bearer-token-authenticated ingest API (POST /api/v1/snapshot), SQLite persistence (WAL + migrations), and a reconciliation engine that drives the integrations.
  • Core — shared types and the typed docktornet.* label parser.

Reconciliation engine

  • Derives intended services from container labels and tracks external resources in the database.
  • Diff and full-resync paths serialized through a shared mutex; periodic full verify-and-repair resync loop.
  • Idempotent writes: skips NPM proxy-host updates, Gatus files, and CF records that are already in sync.
  • Adopts pre-existing NPM proxy hosts on create conflict instead of failing.
  • Guards against NPM overload from bulk snapshot reconciles.

Integrations

Nginx Proxy Manager

  • Reconciles proxy hosts (create/update/get-by-id), preserving base paths and cert case matching.
  • block_exploits, websockets, and HSTS subdomains enabled by default.
  • Per-machine forward host reporting; forward host configurable via DOCKTORNET_NPM_FORWARD_HOST.

Cloudflare DNS

  • Reconciles DNS records (create/update/get-by-id) with delete-envelope parsing.

Gatus

  • Writes and lifecycles managed endpoint files with disambiguated, clean names.
  • Optional name label, host-group default, and custom alert provider.
  • Emits Telegram alerts and honors group overrides.

Operations

  • /healthz endpoint and graceful SIGTERM shutdown.
  • Rootless distroless Docker images for agent and server (built via cargo-chef).
  • Compose files, deployment guide, v1 cutover runbook, and external-state backup script.
  • Quieter logging: reduced heartbeat noise, added missing reconcile-action logs.
  • Warns when a machine ID appears from multiple source IPs.

Documentation

  • Full container-label reference grouped by module, label examples, and a compose snippet.
  • Annotated .env.example with required/optional fields and defaults.
  • v1 design spec and implementation plans.

This is the initial release — 96 commits since project inception.