Compare commits

...
291 Commits
Author SHA1 Message Date
beatzaplenty caa6c3001a updated response codes on error pages and pve hostname in traefik config 2026-07-30 06:15:36 +10:00
beatzaplenty 7751662bb4 updated response codes 2026-07-20 02:14:56 +10:00
beatzaplenty cb855416db syntax issues 2026-07-17 11:14:14 +10:00
beatzaplenty faad7cc962 updated include filter 2026-07-17 11:12:47 +10:00
beatzaplenty afe2fce12d updated labels 2026-07-17 11:08:31 +10:00
beatzaplenty 7c6eb8c2a9 update wud tag filter 2026-07-17 11:04:04 +10:00
beatzaplenty 65cf245fbd updated line 2026-07-17 11:00:26 +10:00
beatzaplenty eb13c88e73 updated nextcloud wud tags 2026-07-17 10:59:48 +10:00
beatzaplenty daf02789ac added image tag 2026-07-17 10:36:46 +10:00
beatzaplenty 2954bcf671 seperate docker-socket-proxy from traefik network 2026-07-17 10:10:53 +10:00
git e733382f6c updated gitignore 2026-07-17 09:50:04 +10:00
beatzaplenty 80bdeb8d9d updated wud configuration 2026-07-17 09:42:46 +10:00
git dd9d798bae updated wud configuration 2026-07-17 09:23:23 +10:00
beatzaplenty 2073f953dd updated wud trigger config 2026-07-17 06:34:53 +10:00
beatzaplenty 6d85b51b52 updated profiles 2026-07-17 06:07:04 +10:00
beatzaplenty f88e45b783 updated profiles 2026-07-17 06:05:28 +10:00
beatzaplenty cc794c3896 added whats up docker 2026-07-17 06:02:29 +10:00
git dccff1d61c archived old monitoring system 2026-07-13 14:43:16 +10:00
beatzaplenty f17a8ee22c remove share path 2026-07-13 14:42:40 +10:00
beatzaplenty 8bb9ee242e add docekr volumes to beszel agent 2026-07-13 14:38:27 +10:00
git 46abc20577 migrated to beszel 2026-07-12 19:15:22 +10:00
beatzaplenty 065d59d68b updated uptime kuma image version 2026-07-07 12:30:33 +10:00
beatzaplenty d47635879a updated image versions 2026-07-07 12:25:12 +10:00
beatzaplenty f27d98b57f update after backup restore 2026-07-07 03:08:48 +10:00
beatzaplenty 656df7fb41 added data root 2026-07-07 01:15:41 +10:00
beatzaplenty b68d90bad5 update project root 2026-07-07 01:08:55 +10:00
beatzaplenty d25ffd8957 update project root 2026-07-07 01:07:08 +10:00
beatzaplenty c127e8a709 remove DATA_ROOT and update PROJECT_ROOT 2026-07-07 01:04:10 +10:00
beatzaplenty fb07135179 updated NFS shares 2026-07-07 00:59:32 +10:00
git eb68cdc425 updated crowdsec config 2026-07-06 16:12:05 +10:00
git 031ed3ac37 config updated 2026-07-02 21:20:01 +10:00
git 93b24200b1 updated configuration 2026-07-02 21:03:10 +10:00
git 951b37e78a Merge branch 'main' of https://gitea.lan.ddnsgeek.com/beatzaplenty/docker 2026-07-02 12:53:46 +10:00
git 5e47ae2777 moved to NFS share for volume storage. Migrated all data 2026-07-02 12:49:48 +10:00
beatzaplenty cc015fe9a2 Delete docker 2026-07-01 08:50:54 +00:00
git d9cce278e6 updated config 2026-06-24 12:04:29 +10:00
git e455438325 Authelia config updates and Nextcloud build clean up. added run all updates script 2026-06-01 08:41:23 +10:00
git f303ddd6a7 update influxdb ports
Validate Docs (Gitea) / validate (push) Failing after 38s
2026-05-20 05:47:19 +10:00
git c89b8129ec Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-05-13 14:52:27 +10:00
git c98b2d8232 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-05-13 14:51:42 +10:00
beatzaplenty 3a9b3786c5 merge 2026-05-13 14:47:26 +10:00
beatzaplenty 1131eceb94 add socket proxy support 2026-05-13 14:45:32 +10:00
git 586be50567 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-05-13 14:34:03 +10:00
beatzaplenty d0e08b8fc1 corrected docker-compose package name 2026-05-13 14:33:40 +10:00
git 487117b31a Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-05-13 14:29:09 +10:00
beatzaplenty 82fa90d843 install docker tooling to generate docs 2026-05-13 14:28:28 +10:00
git ef1e7432ee Merge branch 'main' of https://gitea.lan.ddnsgeek.com/beatzaplenty/docker 2026-05-13 14:16:08 +10:00
beatzaplenty 427ea20e43 updated gitea validation workflow 2026-05-13 14:15:05 +10:00
beatzaplenty 3298219ccf Update .gitea/workflows/generate-docs.yml
Validate Docs (Gitea) / validate (push) Failing after 3s
2026-05-13 04:05:39 +00:00
beatzaplenty b30c7f3a8a Update .gitea/workflows/validate-docs.yml
Validate Docs (Gitea) / validate (push) Failing after 5s
2026-05-13 04:05:12 +00:00
beatz174-bit 374511c123 Merge pull request #77 from beatz174-bit/codex/implement-dual-ci-workflow-for-docs-generation
Validate Docs (Gitea) / validate (push) Has been cancelled
ci: split docs generation to Gitea and docs validation/publish to GitHub
2026-05-13 14:01:16 +10:00
beatz174-bit 313f7f1c21 ci: use extended regex for docs secret scan 2026-05-13 14:00:52 +10:00
beatz174-bit 6aa78525c2 ci: split docs generation and publishing across gitea/github 2026-05-13 13:55:02 +10:00
beatz174-bit 5e0de23ff7 Merge pull request #75 from beatz174-bit/codex/update-docs-generation-workflow-for-reliability
Harden docs generation pipeline to refresh compose and Terraform data first
2026-05-13 13:42:20 +10:00
beatz174-bit 3c655dabcf Harden docs generation pipeline with strict source refresh 2026-05-13 13:40:50 +10:00
git 60e59f95a8 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-05-13 10:32:02 +10:00
git cdf37fb2c9 Regenerate docs 2026-05-13 10:30:45 +10:00
beatz174-bit f56b734cb4 Merge pull request #74 from beatz174-bit/codex/fix-public-diagrams-generation-scripts
Fix generated public topology and routing diagrams to use inventory-aware concepts
2026-05-13 10:18:20 +10:00
beatz174-bit 10c4373c0e Fix invalid DOT cluster label emission for host inventory 2026-05-13 10:17:37 +10:00
beatz174-bit 2619d86dc1 Fix public topology/routing diagram generation and layout 2026-05-13 10:08:42 +10:00
git 1b679a4f09 Refine public docs diagrams 2026-05-13 09:48:45 +10:00
beatz174-bit 02033cd3f9 Merge pull request #73 from beatz174-bit/codex/refine-github-pages-documentation-and-diagrams
Remove Prometheus Rules from public docs; simplify physical and Traefik/DNS diagrams
2026-05-13 09:37:07 +10:00
beatz174-bit d932bc57d0 Remove stale Prometheus Rules nav from public MkDocs config 2026-05-13 09:36:23 +10:00
beatz174-bit c4cfa8081f Refine public docs generation and simplify topology diagrams 2026-05-13 09:33:29 +10:00
beatz174-bit 90c9094a6f Merge pull request #72 from beatz174-bit/codex/improve-documentation-with-generated-diagrams
Generate physical and Docker/Traefik/Dynu diagrams; require Graphviz and validate in CI
2026-05-13 09:18:29 +10:00
beatz174-bit 36c5f2b1e3 Restore legacy docker-compose diagram semantics 2026-05-13 09:17:47 +10:00
beatz174-bit 7bc2729ef6 Fix Traefik router backend targets in generated diagrams 2026-05-13 09:17:41 +10:00
beatz174-bit 9d79f828e4 Improve docs pipeline with generated topology diagrams 2026-05-13 09:08:47 +10:00
beatz174-bit 22b3659cdf Update publish-docs.yml 2026-05-13 08:53:35 +10:00
git 4440fddb2b docs: regenerate public docs 2026-05-13 08:51:51 +10:00
beatz174-bit d74000fbd0 Merge pull request #71 from beatz174-bit/codex/refactor-docs-pipeline-for-local-generation
docs: publish only committed public docs from GitHub Actions
2026-05-13 08:49:01 +10:00
beatz174-bit 9efdb5c781 Merge branch 'main' into codex/refactor-docs-pipeline-for-local-generation 2026-05-13 08:48:43 +10:00
beatz174-bit e7fd52616d docs: move public docs generation to local workflow 2026-05-13 08:47:23 +10:00
beatz174-bit b7b4b4d36d Merge pull request #70 from beatz174-bit/codex/fix-github-pages-to-deploy-public-docs-only
docs: publish GitHub Pages from docs/public only
2026-05-13 08:45:54 +10:00
beatz174-bit 40f5a3ce0d docs: publish only docs/public to GitHub Pages 2026-05-13 08:43:57 +10:00
beatz174-bit 8e43118661 docs: regenerate environment documentation 2026-05-12 22:35:56 +00:00
beatz174-bit 0e76f3cef1 Merge pull request #69 from beatz174-bit/codex/fix-docs-generation-for-docker-compose-profiles
Fix docs compose rendering by enabling `all` profile and add fail-fast check
2026-05-13 08:35:26 +10:00
beatz174-bit 8d18ab7059 Fix docs compose rendering to include all profiles 2026-05-13 08:33:26 +10:00
beatz174-bit 6a959d85c3 Merge pull request #68 from beatz174-bit/codex/add-mkdocs-publishing-to-github-pages
Add GitHub Pages MkDocs publish workflow
2026-05-13 08:29:06 +10:00
beatz174-bit 79c583eca3 Add MkDocs GitHub Pages publish workflow 2026-05-13 08:25:31 +10:00
beatz174-bit 7fcafed3f9 docs: regenerate environment documentation 2026-05-12 22:21:06 +00:00
beatz174-bit 0b67830d7f Merge pull request #67 from beatz174-bit/codex/update-github-actions-for-automated-docs-generation
docs: auto-commit generated docs on push and add browsable docs site structure
2026-05-13 08:20:21 +10:00
beatz174-bit d878a0f9b8 docs: make compose inventory generation deterministic 2026-05-13 08:19:39 +10:00
beatz174-bit 9c38910a67 docs: automate generated docs commits and add docs site structure 2026-05-13 08:09:51 +10:00
beatz174-bit 4a38a9421d Merge pull request #66 from beatz174-bit/codex/add-github-actions-for-docs-generation
docs: add GitHub Actions pipeline for compose documentation generation
2026-05-13 07:54:48 +10:00
beatz174-bit 5d32693925 docs: remove rg dependency and avoid archive compose fallback 2026-05-13 07:52:53 +10:00
beatz174-bit 696cecfecb ci: make compose installation resilient on ubuntu runners 2026-05-13 07:49:34 +10:00
beatz174-bit c0360a14b9 docs: add automated compose documentation generation pipeline 2026-05-13 07:45:57 +10:00
beatz174-bit 5589594d2c Merge pull request #65 from beatz174-bit/codex/add-dynu-dns-records-to-architecture-docs
Add optional Dynu DNS inventory support to architecture docs generation
2026-05-13 07:37:33 +10:00
beatz174-bit 0bd41b2fb1 Migrate legacy architecture heading during section upsert 2026-05-13 07:36:57 +10:00
beatz174-bit 5f10d0366e Add optional Dynu DNS inventory to architecture doc generator 2026-05-13 07:31:20 +10:00
git 9f98101c5d first dynu record generation 2026-05-13 07:23:20 +10:00
git 0c20676590 update .gitignore 2026-05-13 07:22:55 +10:00
beatz174-bit 59e2c2b9a3 Merge pull request #64 from beatz174-bit/codex/add-interactive-picker-for-terraform-outputs
Add interactive Terraform output picker for Dynu brownfield generator
2026-05-13 06:52:37 +10:00
beatz174-bit 61d49e85a3 Add interactive Terraform output picker for Dynu generator 2026-05-13 06:52:24 +10:00
beatz174-bit 8f84ed6d83 Merge pull request #63 from beatz174-bit/codex/fix-regexreplace-usage-in-terraform
Remove unsupported `regexreplace` usage from Dynu Terraform inventory
2026-05-13 06:42:07 +10:00
beatz174-bit 24cbb02bff Fix Dynu inventory by removing unsupported regexreplace usage 2026-05-13 06:40:25 +10:00
beatz174-bit 685a472572 Merge pull request #62 from beatz174-bit/codex/fix-dynu-brownfield-generator-keyerror
Fix Dynu brownfield generator output handling and state->enabled mapping
2026-05-13 06:37:33 +10:00
beatz174-bit 9de1bee542 Fix Dynu brownfield generator output handling 2026-05-13 06:37:10 +10:00
beatz174-bit 306e2c14db Merge pull request #61 from beatz174-bit/codex/update-terraform-for-dynu-dns-reconciliation
Add Dynu brownfield DNS inventory, outputs, and generator
2026-05-13 06:23:27 +10:00
beatz174-bit 63b47b59b5 Align wildcard DNS name sanitization across outputs and generator 2026-05-13 06:23:03 +10:00
beatz174-bit 52bd2d9fa2 Add Dynu brownfield DNS inventory outputs and generator 2026-05-13 06:03:32 +10:00
git 034ad17cf9 updated dynu terraform configuration 2026-05-13 05:37:59 +10:00
beatz174-bit ef2846562b Merge pull request #60 from beatz174-bit/codex/add-dynu-dns-terraform-documentation-layer-3vpdzo
dynu: add configurable root domain, import-ready domain resource, unpin provider version, and docs updates
2026-05-13 05:29:50 +10:00
beatz174-bit 52e2102f93 Merge branch 'main' into codex/add-dynu-dns-terraform-documentation-layer-3vpdzo 2026-05-13 05:29:40 +10:00
beatz174-bit a9b21912db Derive Dynu record FQDNs from configured root domain 2026-05-13 05:28:32 +10:00
beatz174-bit c9e4aeb8d6 Add dynu_record_import_id variable for record imports 2026-05-13 05:28:27 +10:00
beatz174-bit 96a44d5da6 Add dynu_root_domain variable for domain import flow 2026-05-13 05:18:02 +10:00
beatz174-bit 0d936677e5 Merge pull request #59 from beatz174-bit/codex/add-dynu-dns-terraform-documentation-layer-0fccdt
dynu: unpin provider, add domain skeleton, update imports/docs and records
2026-05-13 05:09:36 +10:00
beatz174-bit 5c38b92bc8 Remove Dynu provider version constraint 2026-05-13 05:09:17 +10:00
beatz174-bit fc5c882193 Merge pull request #58 from beatz174-bit/codex/add-host-topology-documentation-generator
Include VM-to-host mappings in Proxmox inventory output
2026-05-13 04:36:56 +10:00
beatz174-bit a4501d4034 Add VM inventory to proxmox outputs for host topology 2026-05-13 04:36:38 +10:00
beatz174-bit c0958d8f02 Merge pull request #57 from beatz174-bit/codex/add-dynu-dns-terraform-documentation-layer
Add Dynu Terraform brownfield DNS documentation layer
2026-05-13 03:36:03 +10:00
beatz174-bit 2a97864a06 Add Dynu Terraform brownfield DNS documentation layer 2026-05-13 03:17:37 +10:00
beatz174-bit bd23339edd Merge pull request #56 from beatz174-bit/codex/add-gitea-actions-runner-with-socket-proxy
Add Gitea Actions runner and configuration (compose, env, README)
2026-05-12 14:04:22 +10:00
beatz174-bit f8091a5c76 Use DOCKER_SOCKET_PROXY_HOST for gitea-runner Docker host 2026-05-12 14:03:57 +10:00
beatz174-bit 6a2639f931 Merge pull request #55 from beatz174-bit/codex/improve-dynu-dns-inventory-correlation
Harden Dynu/Traefik DNS correlation parsing and validation
2026-04-21 14:11:36 +10:00
beatz174-bit fae5e119d1 Harden Dynu/Traefik DNS correlation and validation 2026-04-21 14:11:25 +10:00
git 872038d0c9 first succesful build of dynu inventory 2026-04-21 13:57:16 +10:00
beatz174-bit 7a6db9fcfd Merge pull request #54 from beatz174-bit/codex/fix-dynu-api-authentication-error
Handle Dynu API auth failures without Python traceback
2026-04-21 13:52:16 +10:00
beatz174-bit d6a8979d55 Handle Dynu API auth failures without traceback 2026-04-21 13:52:01 +10:00
beatz174-bit a9a8a708d3 Merge pull request #53 from beatz174-bit/codex/fix-dynu-api-authentication-issue
Auto-load secrets/dynu.env, harden Dynu credential handling, and update docs
2026-04-21 13:38:52 +10:00
beatz174-bit 749c0d500d Improve Dynu env handling and document secrets/dynu.env 2026-04-21 13:38:33 +10:00
beatz174-bit 8f112af65b Merge pull request #52 from beatz174-bit/codex/integrate-dynu-dns-in-read-only-mode
Add read-only Dynu DNS inventory and Traefik correlation scripts
2026-04-21 12:45:50 +10:00
beatz174-bit 580e9b9aed Add strict read-only Dynu DNS inventory integration 2026-04-21 12:31:52 +10:00
beatz174-bit c77db36865 Merge pull request #51 from beatz174-bit/codex/add-basic-ansible-foundation
Add phase-1 Ansible foundation and safe validation hooks
2026-04-21 12:10:07 +10:00
beatz174-bit e11dc22999 Add phase-1 Ansible foundation and validation scaffolding 2026-04-21 12:07:29 +10:00
beatz174-bit 862ddd42f8 Merge pull request #50 from beatz174-bit/codex/update-documentation-for-codex-setup
docs: document Codex setup and maintenance scripts
2026-04-21 11:51:18 +10:00
beatz174-bit d0e7e52150 docs: add codex setup and maintenance script guidance 2026-04-21 11:51:02 +10:00
git f0aa9941d8 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-21 11:34:21 +10:00
git 6789451bd6 moved codex environment scripts to repo 2026-04-21 11:33:50 +10:00
beatz174-bit b8d9e62954 Merge pull request #49 from beatz174-bit/codex/refactor-secret-inventory-and-documentation-structure
Refactor secrets inventory into docs and JSON source of truth
2026-04-21 11:25:04 +10:00
beatz174-bit 9f36dabcdc Refactor secrets inventory into docs + machine-readable JSON 2026-04-21 11:24:45 +10:00
beatz174-bit 3c78e9c140 Merge pull request #48 from beatz174-bit/codex/remove-unsupported-labels-from-containers
terraform(docker): remove unsupported docker_container labels arg and ignore label drift
2026-04-21 11:20:17 +10:00
beatz174-bit 40a976f712 terraform: remove docker_container labels args and ignore label drift 2026-04-21 11:20:08 +10:00
beatz174-bit 451be4ab0d Update AGENTS.md 2026-04-21 11:00:31 +10:00
beatz174-bit b848d6b807 Merge pull request #46 from beatz174-bit/codex/complete-terraform-documentation-for-docker
Document full Docker compose container inventory in Terraform docker layer
2026-04-21 09:46:46 +10:00
beatz174-bit 4695839df4 Manage container labels and expose labels in inventory output 2026-04-21 09:43:38 +10:00
beatz174-bit cb92ebc70e Fix Terraform container address and traefik runtime wiring 2026-04-21 09:43:33 +10:00
beatz174-bit 5c3bc0317c Merge pull request #47 from beatz174-bit/codex/perform-documentation-overhaul-for-repo
docs: refresh and expand repository documentation model
2026-04-21 09:35:33 +10:00
beatz174-bit c7dd9f2229 docs: overhaul repo documentation and workflow guides 2026-04-21 09:28:55 +10:00
beatz174-bit 7258d150ad Document full Docker compose container inventory in Terraform 2026-04-21 09:26:36 +10:00
git 020d6ecb79 created AGENTS.md 2026-04-21 09:04:59 +10:00
git b3cc235164 added physical machines 2026-04-21 08:43:15 +10:00
git b422a55c02 Updated terraform configurations 2026-04-20 22:23:20 +10:00
beatz174-bit b6d2e4ee62 Merge pull request #45 from beatz174-bit/codex/update-node-red-flow-for-idempotency
Make Grafana Docker Safe Update flow idempotent for repeated alerts
2026-04-15 07:42:34 +10:00
beatz174-bit 438cf57127 Make Grafana docker update flow idempotent after success 2026-04-15 07:42:00 +10:00
beatz174-bit 6ada434618 Merge pull request #44 from beatz174-bit/codex/create-script-to-automate-terraform-configuration-seiyl9
Add script to generate Terraform config from plan and document its usage
2026-04-14 20:19:10 +10:00
beatz174-bit 2a6c905eb8 Merge branch 'main' into codex/create-script-to-automate-terraform-configuration-seiyl9 2026-04-14 20:19:02 +10:00
beatz174-bit 9ad21c5846 Harden generated config temp path creation 2026-04-14 20:18:16 +10:00
beatz174-bit 2bab864d5e Merge pull request #43 from beatz174-bit/codex/create-script-to-automate-terraform-configuration
Add Terraform plan-to-config reconciliation script
2026-04-14 18:20:07 +10:00
beatz174-bit ebae1ed990 Add Terraform plan-to-config reconciliation script 2026-04-14 18:19:51 +10:00
beatz174-bit 5e49b6774b Merge pull request #42 from beatz174-bit/codex/scaffold-terraform-structure-for-homelab
Scaffold Terraform foundations for incremental Docker and Proxmox adoption
2026-04-14 18:09:15 +10:00
beatz174-bit 228413d780 Scaffold incremental Terraform foundations for docker and proxmox 2026-04-14 18:08:56 +10:00
git 7279ade925 new file: infrastructure/.gitignore
new file:   infrastructure/terraform/bootstrap/backend.tf
	new file:   infrastructure/terraform/bootstrap/main.tf
	new file:   infrastructure/terraform/bootstrap/outputs.tf
	new file:   infrastructure/terraform/bootstrap/providers.tf
	new file:   infrastructure/terraform/bootstrap/variables.tf
	new file:   infrastructure/terraform/docker/.terraform.lock.hcl
	new file:   infrastructure/terraform/docker/main.tf
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-14 17:42:30 +10:00
git a826c85e08 modified: apps/gramps/docker-compose.yml
modified:   default-environment.env
2026-04-14 16:24:42 +10:00
beatz174-bit 1918b83061 Merge pull request #41 from beatz174-bit/codex/update-gramps-deployment-to-use-gramps-web-u6wwj9
Replace Gramps Postgres service with GrampsWeb + Celery + Redis and update secrets/docs
2026-04-14 14:36:08 +10:00
beatz174-bit fa54b956a7 Merge branch 'main' into codex/update-gramps-deployment-to-use-gramps-web-u6wwj9 2026-04-14 14:35:33 +10:00
beatz174-bit d69c74e537 Add healthchecks for Gramps celery and valkey services 2026-04-14 14:34:31 +10:00
git 0654d9673f modified: apps/gramps/docker-compose.yml 2026-04-14 14:30:09 +10:00
beatz174-bit ff0c413d06 Merge pull request #40 from beatz174-bit/codex/update-gramps-deployment-to-use-gramps-web
Update Gramps to file-backed Gramps Web stack with Celery and Valkey
2026-04-14 14:26:32 +10:00
beatz174-bit f69028963b Update Gramps to file-backed Gramps Web stack with celery and valkey 2026-04-14 14:25:54 +10:00
git 624d7be17c modified: default-environment.env
modified:   monitoring/node-red/data/.flows.json.backup
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-14 12:33:18 +10:00
beatz174-bit b17adee7cc Merge pull request #39 from beatz174-bit/codex/refactor-and-extend-mtls-bridge-for-dynamic-endpoints
mtls-bridge: preserve request paths, add allow-list and configurable health endpoint
2026-04-14 12:08:25 +10:00
beatz174-bit 27c5c3f631 Add optional allow-list support for mtls-bridge paths 2026-04-14 12:07:17 +10:00
git 361d2dc87b modified: core/traefik/traefik.yml
modified:   default-environment.env
	modified:   monitoring/mtls-bridge/docker-compose.yml
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-14 11:32:19 +10:00
git 2499924afc Merge branch 'main' of https://github.com/beatz174-bit/docker
monitoring/mtls-bridge/docker-compose.yml

	modified:   monitoring/mtls-bridge/README.md
	modified:   monitoring/mtls-bridge/docker-compose.yml
2026-04-14 11:11:47 +10:00
git b2ff514a71 modified: core/traefik/traefik.yml
modified:   default-environment.env
	modified:   monitoring/mtls-bridge/docker-compose.yml
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-14 11:08:57 +10:00
beatz174-bit b5cfdde00f Merge pull request #38 from beatz174-bit/codex/add-traefik-label-for-basic-authentication-s6q3tm
Add Traefik basic-auth and CORS middlewares to mtls-bridge and document env vars
2026-04-14 11:08:40 +10:00
beatz174-bit d99e2767b5 Merge branch 'main' into codex/add-traefik-label-for-basic-authentication-s6q3tm 2026-04-14 11:08:34 +10:00
beatz174-bit 7f8e920fa1 Add CORS and OPTIONS handling for mtls-bridge panel actions 2026-04-14 11:06:45 +10:00
git c10b834be0 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-14 09:34:26 +10:00
git f08a567933 modified: monitoring/mtls-bridge/docker-compose.yml
modified:   monitoring/node-red/data/update-events.ndjson
	modified:   update-containers.log
2026-04-14 09:34:12 +10:00
beatz174-bit 85d7859b14 Merge pull request #37 from beatz174-bit/codex/add-traefik-label-for-basic-authentication
Add Traefik basic-auth labels to mtls-bridge
2026-04-14 09:32:54 +10:00
beatz174-bit d06c53ef0b Add Traefik basic auth middleware for mtls-bridge 2026-04-14 09:32:18 +10:00
beatz174-bit 85cf56fcaf Merge pull request #36 from beatz174-bit/codex/investigate-unknown-image-reporting-issue
Fix compose file discovery and path normalization in docker-exporter
2026-04-13 17:35:12 +10:00
beatz174-bit a576dfdaa0 Fix compose image resolution from services-up script 2026-04-13 17:34:44 +10:00
beatz174-bit cf516ab1f4 Update README.md 2026-04-13 17:05:19 +10:00
beatz174-bit e7feec9146 Update architecture.md 2026-04-13 17:04:37 +10:00
git 49caca5700 deleted: docs/diagrams/architecture.mmd
deleted:    docs/diagrams/monitoring-coverage.mmd
2026-04-13 17:02:43 +10:00
git 97f0bac724 Merge branch 'main' of https://github.com/beatz174-bit/docker
new file:   docs/diagrams/architecture.mmd
	new file:   docs/diagrams/monitoring-coverage.mmd
	new file:   scripts/render_prometheus_docs.py
2026-04-13 17:01:36 +10:00
git f8370b6a99 deleted: docs/diagrams/architecture.mmd
deleted:    docs/diagrams/monitoring-coverage.mmd
	deleted:    docs/monitoring-coverage.md
	deleted:    docs/network.md
	deleted:    docs/prometheus-inventory.md
	deleted:    docs/runtime/prometheus-inventory.json
	deleted:    docs/runtime/prometheus-query-exposure.json
	deleted:    docs/runtime/prometheus-query-hypervisor.json
	deleted:    docs/runtime/prometheus-query-job-instance.json
	deleted:    docs/runtime/prometheus-query-jobs.json
	deleted:    docs/runtime/prometheus-query-network.json
	deleted:    docs/runtime/prometheus-query-role.json
	deleted:    docs/runtime/prometheus-query-service.json
	deleted:    docs/runtime/prometheus-query-up.json
	deleted:    docs/runtime/prometheus-targets.json
	deleted:    scripts/export_prometheus_inventory.py
	deleted:    scripts/render_prometheus_docs.py
2026-04-13 17:00:53 +10:00
beatz174-bit d27a994fe6 Merge pull request #35 from beatz174-bit/codex/create-prometheus-documentation-and-diagram-updater-py36tm
Add Prometheus docs renderer and generated monitoring docs/diagrams
2026-04-13 16:55:37 +10:00
beatz174-bit 937c6164d8 Merge branch 'main' into codex/create-prometheus-documentation-and-diagram-updater-py36tm 2026-04-13 16:55:29 +10:00
beatz174-bit 4eed2fd710 docs: fix Mermaid labels for GitHub parser compatibility 2026-04-13 16:54:37 +10:00
beatz174-bit ba41ce7eb0 Merge pull request #34 from beatz174-bit/codex/create-prometheus-documentation-and-diagram-updater
docs: generate Prometheus-driven monitoring docs and Mermaid diagrams
2026-04-13 16:47:40 +10:00
beatz174-bit 26b7b461a3 docs: generate Prometheus-driven monitoring docs and Mermaid diagrams 2026-04-13 16:47:26 +10:00
git 72cda2dc92 modified: default-environment.env
modified:   docs/prometheus-inventory.md
	new file:   docs/runtime/prometheus-inventory.json
	new file:   docs/runtime/prometheus-query-exposure.json
	new file:   docs/runtime/prometheus-query-hypervisor.json
	new file:   docs/runtime/prometheus-query-job-instance.json
	new file:   docs/runtime/prometheus-query-jobs.json
	new file:   docs/runtime/prometheus-query-network.json
	new file:   docs/runtime/prometheus-query-role.json
	new file:   docs/runtime/prometheus-query-service.json
	new file:   docs/runtime/prometheus-query-up.json
	new file:   docs/runtime/prometheus-targets.json
	modified:   monitoring/docker-socket-proxy/docker-compose.yml
	modified:   monitoring/mtls-bridge/docker-compose.yml
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-13 16:40:32 +10:00
beatz174-bit 2b83cd5599 Merge pull request #33 from beatz174-bit/codex/create-prometheus-inventory-export-script
docs: add Prometheus inventory export script for diagram/documentation pipeline
2026-04-13 16:30:04 +10:00
beatz174-bit c0ed8cfc5f docs: add Prometheus inventory export script for diagram/documentation pipeline 2026-04-13 16:29:10 +10:00
beatz174-bit 7646f8187b Merge pull request #32 from beatz174-bit/codex/create-infrastructure-diagrams-for-docker/traefik-xvw0xz
Add README and architecture overview for Docker + Traefik homelab stack
2026-04-13 15:54:26 +10:00
beatz174-bit 8d462a83c7 Merge branch 'main' into codex/create-infrastructure-diagrams-for-docker/traefik-xvw0xz 2026-04-13 15:54:20 +10:00
beatz174-bit 29856c4d1c docs: fix Mermaid edge label parsing in architecture diagram 2026-04-13 15:53:45 +10:00
beatz174-bit ce626ee0c8 Merge pull request #31 from beatz174-bit/codex/create-infrastructure-diagrams-for-docker/traefik-ivyntw
Add initial README and architecture documentation for Docker + Traefik homelab stack
2026-04-13 15:51:58 +10:00
beatz174-bit 18104468aa Merge branch 'main' into codex/create-infrastructure-diagrams-for-docker/traefik-ivyntw 2026-04-13 15:51:50 +10:00
beatz174-bit f136f49e51 docs: fix Mermaid parse error in architecture diagram 2026-04-13 15:51:21 +10:00
beatz174-bit ee609201b3 Merge pull request #30 from beatz174-bit/codex/create-infrastructure-diagrams-for-docker/traefik
docs: add inferred Docker/Traefik architecture diagrams and summary
2026-04-13 15:47:09 +10:00
beatz174-bit 25f91e301c docs: add Docker/Traefik architecture diagrams and summary 2026-04-13 15:46:48 +10:00
beatz174-bit cbdf9c9562 Merge pull request #29 from beatz174-bit/codex/add-logging-and-env-var-for-log-level-xiw6bv
mtls-bridge: add upstream CA handling, request timing, and improved logging
2026-04-13 15:02:12 +10:00
beatz174-bit de82d295fb Merge branch 'main' into codex/add-logging-and-env-var-for-log-level-xiw6bv 2026-04-13 15:02:03 +10:00
beatz174-bit 8224009aa6 Add backward-compatible CA_CERT alias to prevent startup NameError 2026-04-13 15:01:29 +10:00
beatz174-bit d98f74a9d0 Merge pull request #28 from beatz174-bit/codex/add-logging-and-env-var-for-log-level-q2b7yp
mtls-bridge: Add upstream TLS verification options, request timing, and enhanced logging
2026-04-13 14:55:49 +10:00
beatz174-bit 3d49ebdeee Merge branch 'main' into codex/add-logging-and-env-var-for-log-level-q2b7yp 2026-04-13 14:55:40 +10:00
beatz174-bit a515e3e25b Proxy OPTIONS requests and warn on http upstream target 2026-04-13 14:54:30 +10:00
beatz174-bit 0a3cfa4631 Merge pull request #27 from beatz174-bit/codex/add-logging-and-env-var-for-log-level-nwi0f7
mtls-bridge: add upstream TLS verify handling, timing, and improved logging
2026-04-13 14:06:23 +10:00
beatz174-bit 15b349604c Merge branch 'main' into codex/add-logging-and-env-var-for-log-level-nwi0f7 2026-04-13 14:06:13 +10:00
beatz174-bit 4a0ab9d184 Fix upstream TLS verification configuration for mtls-bridge 2026-04-13 14:05:26 +10:00
beatz174-bit 155373a171 Merge pull request #26 from beatz174-bit/codex/add-logging-and-env-var-for-log-level-lkuozx
mtls-bridge: enhance logging/timing and fix docker-compose cert/env
2026-04-13 13:58:30 +10:00
beatz174-bit a29fcc85d0 Fix mtls-bridge CA path and reduce healthcheck log noise 2026-04-13 13:58:05 +10:00
beatz174-bit b6ff09513f Merge pull request #25 from beatz174-bit/codex/add-logging-and-env-var-for-log-level
Add richer mtls-bridge request logging and configurable log level
2026-04-13 13:42:10 +10:00
beatz174-bit a0b9dd980b Add configurable logging for mtls-bridge proxy 2026-04-13 13:41:53 +10:00
git 649965e97a modified: monitoring/mtls-bridge/docker-compose.yml 2026-04-13 13:29:04 +10:00
git db57390bf9 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-13 13:19:28 +10:00
beatz174-bit 4e61ac701f Merge pull request #24 from beatz174-bit/codex/implement-internal-mtls-bridge-service
Add internal mTLS bridge service for monitoring (mtls-bridge)
2026-04-13 13:18:56 +10:00
beatz174-bit cd47fe324e Add internal mTLS bridge service for monitoring stack 2026-04-13 13:18:40 +10:00
git d6baa39bf4 deleted: core/docker-compose.yml
modified:   monitoring/node-red/data/.flows.json.backup
	modified:   monitoring/node-red/data/.flows_cred.json.backup
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/flows.json
	modified:   monitoring/node-red/data/flows_cred.json
	modified:   monitoring/node-red/data/update-events.ndjson
2026-04-13 13:15:46 +10:00
beatz174-bit 6f47e654a8 Merge pull request #23 from beatz174-bit/codex/implement-mtls-for-private-admin-services
Enforce mTLS for private-admin services via Traefik
2026-04-13 12:06:14 +10:00
beatz174-bit 24047b0eaa Enforce mTLS on private-admin Traefik routes 2026-04-13 12:05:43 +10:00
git 0ddbb7d7ad modified: .gitignore
new file:   monitoring/influxdb/docker-compose.yml
2026-04-13 11:53:24 +10:00
git 43f25321d7 modified: core/authelia/docker-compose.yml
modified:   core/crowdsec/docker-compose.yml
	modified:   core/error-pages/docker-compose.yml
	modified:   monitoring/docker-exporter/docker-compose.yml
	modified:   monitoring/docker-socket-proxy/docker-compose.yml
	deleted:    monitoring/influxdb-service/docker-compose.yml
	modified:   monitoring/node-exporter/docker-compose.yml
	modified:   monitoring/pihole-exporter/docker-compose.yml
	modified:   monitoring/telegraf/docker-compose.yml
	new file:   service-access-policy.md
2026-04-13 11:51:45 +10:00
beatz174-bit 9678c6a8f1 Merge pull request #22 from beatz174-bit/codex/update-profiles-in-docker-compose.yml-files
Normalize Docker Compose service profiles by folder hierarchy
2026-04-13 11:28:17 +10:00
beatz174-bit c1401e3e08 Normalize compose service profiles by folder hierarchy 2026-04-13 11:27:27 +10:00
beatz174-bit 5c600d0af0 Merge pull request #21 from beatz174-bit/codex/split-compose-files-by-service
Split core and monitoring compose files into single-service compose files
2026-04-13 10:23:36 +10:00
beatz174-bit e3d463d511 Merge branch 'main' into codex/split-compose-files-by-service 2026-04-13 10:23:24 +10:00
beatz174-bit ff2d323309 Split core and prometheus compose files by service 2026-04-13 10:22:42 +10:00
beatz174-bit 47a5908430 Merge pull request #20 from beatz174-bit/codex/update-traefik-configuration-for-trusted-proxies
Restrict Traefik forwarded headers to trusted IPs, enable Authelia trustForwardHeader, and add traefik network subnet
2026-04-13 10:16:25 +10:00
beatz174-bit 8448f2bb94 Narrow trusted proxy CIDRs and pin Traefik subnet 2026-04-13 10:16:06 +10:00
beatz174-bit cfbefed2e3 Merge pull request #19 from beatz174-bit/codex/update-security_secrets_inventory.md
docs: align secrets inventory with current .env example
2026-04-13 09:55:30 +10:00
beatz174-bit 3b3f06a727 docs: align secrets inventory with example env keys 2026-04-13 09:55:14 +10:00
git 8c82830af8 modified: secrets/.env.secrets.example 2026-04-13 09:49:41 +10:00
git 9ebb3c6c93 new file: monitoring/node-red/data/update-events.ndjson 2026-04-13 09:42:04 +10:00
git 86fba4f43f modified: default-environment.env
modified:   monitoring/node-red/Dockerfile
	modified:   monitoring/node-red/data/.flows.json.backup
	modified:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	modified:   monitoring/node-red/data/flows.json
	modified:   monitoring/node-red/data/test-container.sh
	modified:   monitoring/node-red/docker-compose.yml
	modified:   services-up.sh
	monitoring/node-red/data/update-events.ndjson
2026-04-13 09:41:16 +10:00
beatz174-bit d6325494c7 Merge pull request #18 from beatz174-bit/codex/fix-node-red-container-startup-issue-m9hwhm
Make services-up.sh project-root aware and pass --project-directory to docker compose
2026-04-13 08:50:11 +10:00
beatz174-bit 2021ef37ae Merge branch 'main' into codex/fix-node-red-container-startup-issue-m9hwhm 2026-04-13 08:50:01 +10:00
beatz174-bit aae70d93b4 Default PROJECT_ROOT to script directory 2026-04-13 08:49:22 +10:00
beatz174-bit 7bc4d6699d Merge pull request #17 from beatz174-bit/codex/fix-node-red-container-startup-issue
Respect PROJECT_ROOT and use --project-directory in services-up.sh
2026-04-13 08:27:20 +10:00
beatz174-bit e4dd0394fe Silence find permission errors in services-up 2026-04-13 08:26:25 +10:00
beatz174-bit 1a65661474 Make services-up use PROJECT_ROOT for compose paths 2026-04-13 08:23:36 +10:00
beatz174-bit 01279edc5b Merge pull request #16 from beatz174-bit/codex/dynamically-find-compose-files-in-script
services-up.sh: add strict mode, dynamic compose file discovery, and safer arg quoting
2026-04-13 07:33:35 +10:00
beatz174-bit 4d713b02f3 Make services-up compose file discovery dynamic 2026-04-13 07:33:14 +10:00
beatz174-bit 4d681021e1 Merge pull request #15 from beatz174-bit/codex/add-logging-output-for-grafana-zolp0e
Fix Node-RED unknown-project errors when Grafana alert labels are missing
2026-04-13 06:20:19 +10:00
beatz174-bit 30f53eb668 Harden unknown-project Node-RED functions for missing labels 2026-04-13 06:19:57 +10:00
beatz174-bit a9593d7589 Merge pull request #14 from beatz174-bit/codex/add-logging-output-for-grafana
Add Node-RED update-event logging and Telegraf ingestion for Grafana
2026-04-13 06:13:29 +10:00
beatz174-bit 232fdfbb36 Wire Node-RED update events to structured update log file 2026-04-13 06:12:59 +10:00
beatz174-bit 9f9cfaf4be Merge pull request #13 from beatz174-bit/codex/review-grafana-docker-safe-update-flow
Fix Node-RED Grafana safe update flow parsing and lockout notifications
2026-04-13 05:51:43 +10:00
beatz174-bit 8337b53da3 Fix Grafana docker update flow label parsing and lockout notifications 2026-04-13 05:51:28 +10:00
git d519139615 new file: monitoring/node-red/data/.config.nodes.json
new file:   monitoring/node-red/data/.config.runtime.json
	new file:   monitoring/node-red/data/.config.runtime.json.backup
	new file:   monitoring/node-red/data/.config.users.json
	new file:   monitoring/node-red/data/.config.users.json.backup
	new file:   monitoring/node-red/data/.flows.json.backup
	new file:   monitoring/node-red/data/.flows_cred.json.backup
	new file:   monitoring/node-red/data/.npm/_cacache/content-v2/sha512/b0/47/c1458664fa9b6a08e9035110b523127a96bd7285d19472dc702f5dc498b927412b0ecd3273708fbf9d61754520599ac0b0e11f3e4c4d4ac784e78d7d97fe
	new file:   monitoring/node-red/data/.npm/_cacache/content-v2/sha512/c2/c2/b64870ea5c5a42b5772106f51123cf684d3c8381de10ccc07d01168d111d0a1ab79ee26fda320b3027c76cfc856119f7b440845a83c9f22d7d731643e62f
	new file:   monitoring/node-red/data/.npm/_cacache/index-v5/15/a4/2638498d877ec2c8c3d88cb9c08d7867c52d3fceb6fc64cc5abde73b01a9
	new file:   monitoring/node-red/data/.npm/_cacache/index-v5/48/03/b8903b717bbc1ad41b3f37148db48f54e0828c1aef870973f6672895d689
	new file:   monitoring/node-red/data/.npm/_logs/2026-04-05T01_36_15_515Z-debug-0.log
	new file:   monitoring/node-red/data/context/00b02bbd01c91485/flow.json
	new file:   monitoring/node-red/data/context/global/global.json
	new file:   monitoring/node-red/data/flows.json
	new file:   monitoring/node-red/data/flows_cred.json
	new file:   monitoring/node-red/data/node_modules/.package-lock.json
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/CHANGELOG.md
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/LICENSE
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/README.md
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/flow-debugger.html
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/flow-debugger.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/flow-debugger.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/MessageQueue.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/MessageQueue.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/debugger.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/debugger.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/location.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/location.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/types.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/lib/types.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/locales/en-US/flow-debugger.json
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/locales/ja/flow-debugger.json
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/nr-types.js
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/dist/nr-types.js.map
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/package.json
	new file:   monitoring/node-red/data/node_modules/node-red-debugger/resources/style.css
	new file:   monitoring/node-red/data/package-lock.json
	new file:   monitoring/node-red/data/package.json
	new file:   monitoring/node-red/data/settings.js
	new file:   monitoring/node-red/data/test-container.sh
	new file:   monitoring/node-red/data/test-container.sh.old
	new file:   monitoring/node-red/data/webhook.json
2026-04-13 05:36:20 +10:00
git 8c5a902613 modified: .gitignore
modified:   default-environment.env
	modified:   monitoring/portainer/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
	modified:   update-containers.log
2026-04-13 05:35:12 +10:00
beatz174-bit f09ac96e06 Merge pull request #12 from beatz174-bit/codex/add-api-toggles-for-portainer
Enable missing docker-socket-proxy API toggles required by Portainer
2026-04-08 10:17:24 +10:00
beatz174-bit 4ff815e73e Enable additional docker-socket-proxy APIs for Portainer 2026-04-08 10:17:10 +10:00
git 2d17c0a70d modified: core/docker-compose.yml
modified:   core/traefik/dynamic.yml
	modified:   core/traefik/traefik.yml
	modified:   monitoring/portainer/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
	modified:   monitoring/uptime-kuma/docker-compose.yml
2026-04-08 09:57:39 +10:00
git 4e4ffa7f97 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-08 09:19:39 +10:00
git 9b96c94d5d modified: default-environment.env
modified:   monitoring/docker-exporter/exporter.py
	modified:   monitoring/node-red/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
2026-04-08 09:18:33 +10:00
beatz174-bit ab38abf661 Merge pull request #11 from beatz174-bit/codex/refactor-services-to-use-docker-socket-proxy
Switch services from bind-mounting /var/run/docker.sock to docker-socket-proxy (use TCP DOCKER_HOST)
2026-04-08 09:18:22 +10:00
beatz174-bit 94565837f1 use shared prometheus docker-socket-proxy across services 2026-04-08 09:17:44 +10:00
beatz174-bit 700328d677 Merge pull request #10 from beatz174-bit/codex/check-docker-exporter.py-for-excessive-requests
Reduce upstream registry lookups in docker exporter
2026-04-07 22:21:46 +10:00
beatz174-bit 23315dd5ad Reduce registry calls in docker exporter checks 2026-04-07 22:21:27 +10:00
beatz174-bit 7945518a47 Merge pull request #9 from beatz174-bit/codex/enhance-docker-security-configurations
Use docker-socket-proxy and drop container privileges for monitoring services
2026-04-07 22:05:14 +10:00
beatz174-bit 037e3fc46b Merge branch 'main' into codex/enhance-docker-security-configurations 2026-04-07 22:04:32 +10:00
beatz174-bit 8930cb8459 Use single shared docker socket proxy service 2026-04-07 22:01:23 +10:00
git f221b12f8d modified: apps/gramps/docker-compose.yml
modified:   apps/nextcloud/docker-compose.yml
	modified:   apps/passbolt/docker-compose.yml
	modified:   core/authelia/configuration.yml
	modified:   core/docker-compose.yml
	modified:   default-environment.env
	modified:   monitoring/gotify/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
	modified:   monitoring/prometheus/prometheus.yml
	modified:   services-up.sh
2026-04-07 21:57:22 +10:00
git 39debaf4b4 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-07 19:40:06 +10:00
git 8bed8fdcb2 new file: .env.example
new file:   DEPLOYMENT.md
	new file:   SECURITY_SECRETS_INVENTORY.md
	new file:   secrets/.env.secrets.example
2026-04-07 19:39:48 +10:00
git 3b1e0efa19 modified: .gitignore
modified:   apps/gramps/docker-compose.yml
	modified:   apps/nextcloud/docker-compose.yml
	modified:   apps/passbolt/docker-compose.yml
	modified:   core/docker-compose.yml
	modified:   monitoring/gotify/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
	modified:   monitoring/prometheus/prometheus.yml
	.env.example
	DEPLOYMENT.md
	SECURITY_SECRETS_INVENTORY.md
	secrets/
2026-04-07 19:38:51 +10:00
beatz174-bit cf45a16c67 Merge pull request #8 from beatz174-bit/codex/refactor-credential-management-for-docker
Harden compose secret handling and require secret provisioning
2026-04-07 16:18:16 +10:00
beatz174-bit 698fc19e82 Merge branch 'main' into codex/refactor-credential-management-for-docker 2026-04-07 16:18:03 +10:00
beatz174-bit 3c2d28c763 Harden compose secrets and add required provisioning docs 2026-04-07 16:12:50 +10:00
git 8d0ecf0adf modified: default-environment.env
modified:   monitoring/gotify/docker-health-to-gotify.sh
2026-04-07 15:34:41 +10:00
git f7b4cc22b9 Merge branch 'main' of https://github.com/beatz174-bit/docker 2026-04-07 15:15:33 +10:00
git b7983b30d3 modified: apps/gitea/docker-compose.yml
modified:   apps/gramps/docker-compose.yml
	modified:   apps/nextcloud/docker-compose.yml
	modified:   apps/passbolt/docker-compose.yml
	modified:   core/docker-compose.yml
	modified:   default-environment.env
	modified:   monitoring/prometheus/docker-compose.yml
2026-04-07 15:12:42 +10:00
beatz174-bit 1d395287dc Merge pull request #7 from beatz174-bit/codex/move-hard-coded-environment-variables
Move hard-coded compose environment values into default-environment.env
2026-04-07 15:09:26 +10:00
beatz174-bit 634abe4b39 Move hard-coded env values into default-environment.env 2026-04-07 15:08:59 +10:00
git 7f70bd2acb modified: core/authelia/configuration.yml
modified:   core/test/docker-compose.yml
	modified:   monitoring/node-red/Dockerfile
	modified:   monitoring/node-red/docker-compose.yml
	modified:   monitoring/prometheus/docker-compose.yml
	modified:   monitoring/prometheus/prometheus.yml
	modified:   update-containers.log
2026-04-07 14:51:15 +10:00
beatz174-bit 417973b1cb Merge pull request #6 from beatz174-bit/codex/fix-docker-update-exporter-for-multi-arch-images
Fix docker-exporter digest detection for multi-arch images and shorten cache TTL
2026-04-05 16:42:51 +10:00
beatz174-bit cd855028d6 Fix docker exporter digest checks for multi-arch images 2026-04-05 16:42:30 +10:00
beatz174-bit a24cc728c3 Merge pull request #5 from beatz174-bit/codex/verify-metrics-creation-for-prometheus
Log emitted Prometheus metrics and set last_check timestamp in docker exporter
2026-04-01 10:21:59 +10:00
beatz174-bit 663dc51237 Improve exporter metric emission logging 2026-04-01 10:21:33 +10:00
beatz174-bit 1ad8fbba93 Merge pull request #4 from beatz174-bit/codex/refactor-exporter.py-to-extract-images-from-dockerfile-yc2abx
Improve Dockerfile and Compose parsing: ARG substitution, FROM handling, and project root resolution
2026-04-01 10:08:21 +10:00
beatz174-bit f03268e98b Fix project root path resolution for build Dockerfiles 2026-04-01 10:07:57 +10:00
beatz174-bit 778dcf1f26 Merge pull request #3 from beatz174-bit/codex/refactor-exporter.py-to-extract-images-from-dockerfile
Improve Docker exporter resolution for build-only service images
2026-04-01 10:02:14 +10:00
beatz174-bit 5ea6fb5089 Improve build image resolution from Dockerfile base images 2026-04-01 10:01:58 +10:00
beatz174-bit 7e85deb78e Merge pull request #2 from beatz174-bit/codex/refactor-exporter.py-for-command-line-arguments
Add CLI flags for services script, cache file, and log level; apply args at runtime
2026-04-01 09:46:19 +10:00
beatz174-bit 8e85d33f74 Add CLI log level override for docker exporter 2026-04-01 09:45:57 +10:00
beatz174-bit c9fe9ce512 Merge pull request #1 from beatz174-bit/codex/generate-docker-compose.yml-and-refactor-exporter
Resolve images for build-based compose services and add generated compose mapping
2026-04-01 09:37:04 +10:00
beatz174-bit 440af51741 Add compose image mapping for build-based services 2026-04-01 09:36:36 +10:00
git 03ad03c357 deleted: monitoring/uptime-kuma/result
deleted:    monitoring/uptime-kuma/uptime-kuma/kuma.db
2026-04-01 08:58:02 +10:00
git 9da680730d modified: .gitignore
deleted:    monitoring/influxdb/influxd.bolt
	deleted:    monitoring/influxdb/influxd.sqlite
2026-04-01 08:55:12 +10:00
git 56b6b93818 modified: .gitignore
deleted:    core/authelia/users_database.yml
2026-04-01 08:53:24 +10:00
git c32c809581 modified: .gitignore
new file:   .gitignore.gpt
	new file:   .gitignore.old
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-environment-setup-in-conftest.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-geocode.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-route_metrics.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-tracking-simulator.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/extend-sqlite-tuning-in-database.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/fix-route-handling-in-routing.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/handle-api-response-errors-in-routing.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/refactor-database-path-handling-in-database.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-fcm-message-construction-in-notifications.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-role-check-in-ws.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-user-seed-in-database.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-environment-setup-in-conftest.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-geocode.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-route_metrics.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-tracking-simulator.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/extend-sqlite-tuning-in-database.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/fix-route-handling-in-routing.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/handle-api-response-errors-in-routing.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/refactor-database-path-handling-in-database.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-fcm-message-construction-in-notifications.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-role-check-in-ws.py
	deleted:    apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-user-seed-in-database.py
	deleted:    apps/searxng/dockerfiles/docker-entrypoint.sh
	deleted:    apps/searxng/docs/conf.py
	deleted:    apps/searxng/docs/user/.gitignore
	deleted:    apps/searxng/examples/basic_engine.py
	deleted:    apps/searxng/searx/__init__.py
	deleted:    apps/searxng/searx/answerers/__init__.py
	deleted:    apps/searxng/searx/answerers/random/answerer.py
	deleted:    apps/searxng/searx/answerers/statistics/answerer.py
	deleted:    apps/searxng/searx/autocomplete.py
	deleted:    apps/searxng/searx/babel_extract.py
	deleted:    apps/searxng/searx/botdetection/__init__.py
	deleted:    apps/searxng/searx/botdetection/_helpers.py
	deleted:    apps/searxng/searx/botdetection/http_accept.py
	deleted:    apps/searxng/searx/botdetection/http_accept_encoding.py
	deleted:    apps/searxng/searx/botdetection/http_accept_language.py
	deleted:    apps/searxng/searx/botdetection/http_connection.py
	deleted:    apps/searxng/searx/botdetection/http_user_agent.py
	deleted:    apps/searxng/searx/botdetection/ip_limit.py
	deleted:    apps/searxng/searx/botdetection/ip_lists.py
	deleted:    apps/searxng/searx/botdetection/limiter.py
	deleted:    apps/searxng/searx/botdetection/link_token.py
	deleted:    apps/searxng/searx/compat.py
	deleted:    apps/searxng/searx/data/__init__.py
	deleted:    apps/searxng/searx/enginelib/__init__.py
	deleted:    apps/searxng/searx/enginelib/traits.py
	deleted:    apps/searxng/searx/engines/1337x.py
	deleted:    apps/searxng/searx/engines/9gag.py
	deleted:    apps/searxng/searx/engines/__init__.py
	deleted:    apps/searxng/searx/engines/ahmia.py
	deleted:    apps/searxng/searx/engines/annas_archive.py
	deleted:    apps/searxng/searx/engines/apkmirror.py
	deleted:    apps/searxng/searx/engines/apple_app_store.py
	deleted:    apps/searxng/searx/engines/apple_maps.py
	deleted:    apps/searxng/searx/engines/archlinux.py
	deleted:    apps/searxng/searx/engines/artic.py
	deleted:    apps/searxng/searx/engines/arxiv.py
	deleted:    apps/searxng/searx/engines/bandcamp.py
	deleted:    apps/searxng/searx/engines/base.py
	deleted:    apps/searxng/searx/engines/bing.py
	deleted:    apps/searxng/searx/engines/bing_images.py
	deleted:    apps/searxng/searx/engines/bing_news.py
	deleted:    apps/searxng/searx/engines/bing_videos.py
	deleted:    apps/searxng/searx/engines/brave.py
	deleted:    apps/searxng/searx/engines/bt4g.py
	deleted:    apps/searxng/searx/engines/btdigg.py
	deleted:    apps/searxng/searx/engines/command.py
	deleted:    apps/searxng/searx/engines/core.py
	deleted:    apps/searxng/searx/engines/crossref.py
	deleted:    apps/searxng/searx/engines/currency_convert.py
	deleted:    apps/searxng/searx/engines/dailymotion.py
	deleted:    apps/searxng/searx/engines/deepl.py
	deleted:    apps/searxng/searx/engines/deezer.py
	deleted:    apps/searxng/searx/engines/demo_offline.py
	deleted:    apps/searxng/searx/engines/demo_online.py
	deleted:    apps/searxng/searx/engines/deviantart.py
	deleted:    apps/searxng/searx/engines/dictzone.py
	deleted:    apps/searxng/searx/engines/digbt.py
	deleted:    apps/searxng/searx/engines/docker_hub.py
	deleted:    apps/searxng/searx/engines/doku.py
	deleted:    apps/searxng/searx/engines/duckduckgo.py
	deleted:    apps/searxng/searx/engines/duckduckgo_definitions.py
	deleted:    apps/searxng/searx/engines/duckduckgo_images.py
	deleted:    apps/searxng/searx/engines/duckduckgo_weather.py
	deleted:    apps/searxng/searx/engines/duden.py
	deleted:    apps/searxng/searx/engines/dummy-offline.py
	deleted:    apps/searxng/searx/engines/dummy.py
	deleted:    apps/searxng/searx/engines/ebay.py
	deleted:    apps/searxng/searx/engines/elasticsearch.py
	deleted:    apps/searxng/searx/engines/emojipedia.py
	deleted:    apps/searxng/searx/engines/fdroid.py
	deleted:    apps/searxng/searx/engines/flickr.py
	deleted:    apps/searxng/searx/engines/flickr_noapi.py
	deleted:    apps/searxng/searx/engines/framalibre.py
	deleted:    apps/searxng/searx/engines/freesound.py
	deleted:    apps/searxng/searx/engines/frinkiac.py
	deleted:    apps/searxng/searx/engines/genius.py
	deleted:    apps/searxng/searx/engines/gentoo.py
	deleted:    apps/searxng/searx/engines/github.py
	deleted:    apps/searxng/searx/engines/google.py
	deleted:    apps/searxng/searx/engines/google_images.py
	deleted:    apps/searxng/searx/engines/google_news.py
	deleted:    apps/searxng/searx/engines/google_play.py
	deleted:    apps/searxng/searx/engines/google_scholar.py
	deleted:    apps/searxng/searx/engines/google_videos.py
	deleted:    apps/searxng/searx/engines/imdb.py
	deleted:    apps/searxng/searx/engines/ina.py
	deleted:    apps/searxng/searx/engines/invidious.py
	deleted:    apps/searxng/searx/engines/jisho.py
	deleted:    apps/searxng/searx/engines/json_engine.py
	deleted:    apps/searxng/searx/engines/kickass.py
	deleted:    apps/searxng/searx/engines/lemmy.py
	deleted:    apps/searxng/searx/engines/lingva.py
	deleted:    apps/searxng/searx/engines/loc.py
	deleted:    apps/searxng/searx/engines/mediathekviewweb.py
	deleted:    apps/searxng/searx/engines/mediawiki.py
	deleted:    apps/searxng/searx/engines/meilisearch.py
	deleted:    apps/searxng/searx/engines/metacpan.py
	deleted:    apps/searxng/searx/engines/mixcloud.py
	deleted:    apps/searxng/searx/engines/mongodb.py
	deleted:    apps/searxng/searx/engines/mysql_server.py
	deleted:    apps/searxng/searx/engines/nyaa.py
	deleted:    apps/searxng/searx/engines/opensemantic.py
	deleted:    apps/searxng/searx/engines/openstreetmap.py
	deleted:    apps/searxng/searx/engines/openverse.py
	deleted:    apps/searxng/searx/engines/pdbe.py
	deleted:    apps/searxng/searx/engines/peertube.py
	deleted:    apps/searxng/searx/engines/photon.py
	deleted:    apps/searxng/searx/engines/piped.py
	deleted:    apps/searxng/searx/engines/piratebay.py
	deleted:    apps/searxng/searx/engines/postgresql.py
	deleted:    apps/searxng/searx/engines/pubmed.py
	deleted:    apps/searxng/searx/engines/qwant.py
	deleted:    apps/searxng/searx/engines/recoll.py
	deleted:    apps/searxng/searx/engines/reddit.py
	deleted:    apps/searxng/searx/engines/redis_server.py
	deleted:    apps/searxng/searx/engines/rumble.py
	deleted:    apps/searxng/searx/engines/scanr_structures.py
	deleted:    apps/searxng/searx/engines/searchcode_code.py
	deleted:    apps/searxng/searx/engines/searx_engine.py
	deleted:    apps/searxng/searx/engines/semantic_scholar.py
	deleted:    apps/searxng/searx/engines/sepiasearch.py
	deleted:    apps/searxng/searx/engines/seznam.py
	deleted:    apps/searxng/searx/engines/sjp.py
	deleted:    apps/searxng/searx/engines/solidtorrents.py
	deleted:    apps/searxng/searx/engines/solr.py
	deleted:    apps/searxng/searx/engines/soundcloud.py
	deleted:    apps/searxng/searx/engines/spotify.py
	deleted:    apps/searxng/searx/engines/springer.py
	deleted:    apps/searxng/searx/engines/sqlite.py
	deleted:    apps/searxng/searx/engines/stackexchange.py
	deleted:    apps/searxng/searx/engines/startpage.py
	deleted:    apps/searxng/searx/engines/tagesschau.py
	deleted:    apps/searxng/searx/engines/tineye.py
	deleted:    apps/searxng/searx/engines/tokyotoshokan.py
	deleted:    apps/searxng/searx/engines/torznab.py
	deleted:    apps/searxng/searx/engines/translated.py
	deleted:    apps/searxng/searx/engines/twitter.py
	deleted:    apps/searxng/searx/engines/unsplash.py
	deleted:    apps/searxng/searx/engines/vimeo.py
	deleted:    apps/searxng/searx/engines/wikidata.py
	deleted:    apps/searxng/searx/engines/wikipedia.py
	deleted:    apps/searxng/searx/engines/wolframalpha_api.py
	deleted:    apps/searxng/searx/engines/wolframalpha_noapi.py
	deleted:    apps/searxng/searx/engines/wordnik.py
	deleted:    apps/searxng/searx/engines/wttr.py
	deleted:    apps/searxng/searx/engines/www1x.py
	deleted:    apps/searxng/searx/engines/xpath.py
	deleted:    apps/searxng/searx/engines/yacy.py
	deleted:    apps/searxng/searx/engines/yahoo.py
	deleted:    apps/searxng/searx/engines/yahoo_news.py
	deleted:    apps/searxng/searx/engines/youtube_api.py
	deleted:    apps/searxng/searx/engines/youtube_noapi.py
	deleted:    apps/searxng/searx/engines/zlibrary.py
	deleted:    apps/searxng/searx/exceptions.py
	deleted:    apps/searxng/searx/external_bang.py
	deleted:    apps/searxng/searx/external_urls.py
	deleted:    apps/searxng/searx/flaskfix.py
	deleted:    apps/searxng/searx/infopage/__init__.py
	deleted:    apps/searxng/searx/locales.py
	deleted:    apps/searxng/searx/metrics/__init__.py
	deleted:    apps/searxng/searx/metrics/error_recorder.py
	deleted:    apps/searxng/searx/metrics/models.py
	deleted:    apps/searxng/searx/network/__init__.py
	deleted:    apps/searxng/searx/network/client.py
	deleted:    apps/searxng/searx/network/network.py
	deleted:    apps/searxng/searx/network/raise_for_httperror.py
	deleted:    apps/searxng/searx/plugins/__init__.py
	deleted:    apps/searxng/searx/plugins/ahmia_filter.py
	deleted:    apps/searxng/searx/plugins/hash_plugin.py
	deleted:    apps/searxng/searx/plugins/hostname_replace.py
	deleted:    apps/searxng/searx/plugins/limiter.py
	deleted:    apps/searxng/searx/plugins/oa_doi_rewrite.py
	deleted:    apps/searxng/searx/plugins/search_on_category_select.py
	deleted:    apps/searxng/searx/plugins/self_info.py
	deleted:    apps/searxng/searx/plugins/tor_check.py
	deleted:    apps/searxng/searx/plugins/tracker_url_remover.py
	deleted:    apps/searxng/searx/plugins/vim_hotkeys.py
	deleted:    apps/searxng/searx/preferences.py
	deleted:    apps/searxng/searx/query.py
	deleted:    apps/searxng/searx/redisdb.py
	deleted:    apps/searxng/searx/redislib.py
	deleted:    apps/searxng/searx/results.py
	deleted:    apps/searxng/searx/search/__init__.py
	deleted:    apps/searxng/searx/search/checker/__init__.py
	deleted:    apps/searxng/searx/search/checker/__main__.py
	deleted:    apps/searxng/searx/search/checker/background.py
	deleted:    apps/searxng/searx/search/checker/impl.py
	deleted:    apps/searxng/searx/search/checker/scheduler.py
	deleted:    apps/searxng/searx/search/models.py
	deleted:    apps/searxng/searx/search/processors/__init__.py
	deleted:    apps/searxng/searx/search/processors/abstract.py
	deleted:    apps/searxng/searx/search/processors/offline.py
	deleted:    apps/searxng/searx/search/processors/online.py
	deleted:    apps/searxng/searx/search/processors/online_currency.py
	deleted:    apps/searxng/searx/search/processors/online_dictionary.py
	deleted:    apps/searxng/searx/search/processors/online_url_search.py
	deleted:    apps/searxng/searx/settings.yml
	deleted:    apps/searxng/searx/settings_defaults.py
	deleted:    apps/searxng/searx/settings_loader.py
	deleted:    apps/searxng/searx/static/plugins/external_plugins/.gitignore
	deleted:    apps/searxng/searx/static/themes/simple/.gitattributes
	deleted:    apps/searxng/searx/static/themes/simple/.gitignore
	deleted:    apps/searxng/searx/sxng_locales.py
	deleted:    apps/searxng/searx/tools/__init__.py
	deleted:    apps/searxng/searx/tools/config.py
	deleted:    apps/searxng/searx/unixthreadname.py
	deleted:    apps/searxng/searx/utils.py
	deleted:    apps/searxng/searx/version.py
	deleted:    apps/searxng/searx/webadapter.py
	deleted:    apps/searxng/searx/webapp.py
	deleted:    apps/searxng/searx/webutils.py
	deleted:    apps/searxng/searxng_extra/standalone_searx.py
	deleted:    apps/searxng/searxng_extra/update/__init__.py
	deleted:    apps/searxng/searxng_extra/update/update_ahmia_blacklist.py
	deleted:    apps/searxng/searxng_extra/update/update_currencies.py
	deleted:    apps/searxng/searxng_extra/update/update_engine_descriptions.py
	deleted:    apps/searxng/searxng_extra/update/update_engine_traits.py
	deleted:    apps/searxng/searxng_extra/update/update_external_bangs.py
	deleted:    apps/searxng/searxng_extra/update/update_firefox_version.py
	deleted:    apps/searxng/searxng_extra/update/update_osm_keys_tags.py
	deleted:    apps/searxng/searxng_extra/update/update_pygments.py
	deleted:    apps/searxng/searxng_extra/update/update_wikidata_units.py
	deleted:    apps/searxng/setup.py
	deleted:    apps/searxng/tests/__init__.py
	deleted:    apps/searxng/tests/robot/__init__.py
	deleted:    apps/searxng/tests/robot/__main__.py
	deleted:    apps/searxng/tests/robot/settings_robot.yml
	deleted:    apps/searxng/tests/robot/test_webapp.py
	deleted:    apps/searxng/tests/unit/__init__.py
	deleted:    apps/searxng/tests/unit/engines/test_command.py
	deleted:    apps/searxng/tests/unit/engines/test_xpath.py
	deleted:    apps/searxng/tests/unit/network/__init__.py
	deleted:    apps/searxng/tests/unit/network/test_network.py
	deleted:    apps/searxng/tests/unit/settings/empty_settings.yml
	deleted:    apps/searxng/tests/unit/settings/syntaxerror_settings.yml
	deleted:    apps/searxng/tests/unit/settings/test_settings.yml
	deleted:    apps/searxng/tests/unit/settings/user_settings.yml
	deleted:    apps/searxng/tests/unit/settings/user_settings_keep_only.yml
	deleted:    apps/searxng/tests/unit/settings/user_settings_remove.yml
	deleted:    apps/searxng/tests/unit/settings/user_settings_remove2.yml
	deleted:    apps/searxng/tests/unit/settings/user_settings_simple.yml
	deleted:    apps/searxng/tests/unit/test_answerers.py
	deleted:    apps/searxng/tests/unit/test_engines_init.py
	deleted:    apps/searxng/tests/unit/test_exceptions.py
	deleted:    apps/searxng/tests/unit/test_external_bangs.py
	deleted:    apps/searxng/tests/unit/test_locales.py
	deleted:    apps/searxng/tests/unit/test_plugins.py
	deleted:    apps/searxng/tests/unit/test_preferences.py
	deleted:    apps/searxng/tests/unit/test_query.py
	deleted:    apps/searxng/tests/unit/test_results.py
	deleted:    apps/searxng/tests/unit/test_search.py
	deleted:    apps/searxng/tests/unit/test_settings_loader.py
	deleted:    apps/searxng/tests/unit/test_utils.py
	deleted:    apps/searxng/tests/unit/test_webadapter.py
	deleted:    apps/searxng/tests/unit/test_webapp.py
	deleted:    apps/searxng/tests/unit/test_webutils.py
	deleted:    apps/searxng/utils/build_env.py
	deleted:    apps/searxng/utils/filtron.sh
	deleted:    apps/searxng/utils/lib.sh
	deleted:    apps/searxng/utils/lib_go.sh
	deleted:    apps/searxng/utils/lib_nvm.sh
	deleted:    apps/searxng/utils/lib_redis.sh
	deleted:    apps/searxng/utils/lib_sxng_data.sh
	deleted:    apps/searxng/utils/lib_sxng_node.sh
	deleted:    apps/searxng/utils/lib_sxng_static.sh
	deleted:    apps/searxng/utils/lib_sxng_test.sh
	deleted:    apps/searxng/utils/lib_sxng_themes.sh
	deleted:    apps/searxng/utils/lib_sxng_weblate.sh
	deleted:    apps/searxng/utils/lxc.sh
	deleted:    apps/searxng/utils/morty.sh
	deleted:    apps/searxng/utils/searx.sh
	deleted:    apps/searxng/utils/searxng.sh
	deleted:    apps/searxng/utils/searxng_check.py
	deleted:    apps/searxng/utils/templates/etc/searxng/settings.yml
	deleted:    apps/shift-recorder
	deleted:    apps/stockfill
	deleted:    archive/esphome/data/.gitignore
	deleted:    archive/esphome/data/esphome-garage.yaml
	deleted:    archive/esphome/data/esphome-waynes-room.yaml
	deleted:    core/crowdsec/data/detect.yaml
	deleted:    core/traefik/data/dynamic.yaml
	deleted:    core/traefik/data/plugins.yaml
	new file:   default-environment.env
	new file:   docker
	new file:   last-ip.ini
	new file:   monitoring/docker-exporter/Dockerfile.old
	new file:   monitoring/docker-exporter/exporter.py.old
	renamed:    apps/searxng/searxng_extra/__init__.py -> monitoring/gotify/docker-health-alert/last_unhealthy.txt
	new file:   monitoring/grafana/output.txt
	new file:   monitoring/influxdb/influxd.bolt
	new file:   monitoring/influxdb/influxd.sqlite
	deleted:    monitoring/node-red/data/test-container.sh
	new file:   monitoring/prometheus/prometheus.yml.old
	new file:   monitoring/telegraf/telegraf.conf
	new file:   monitoring/uptime-kuma/result
	new file:   monitoring/uptime-kuma/uptime-kuma/kuma.db
	new file:   tree.out
	new file:   update-containers.log
	new file:   update-firewall.log
2026-04-01 08:48:11 +10:00
git 0f2c464392 modified: .gitignore 2026-03-31 20:04:26 +10:00
git b71cd3fcbb modified: .gitignore
new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-environment-setup-in-conftest.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-geocode.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-route_metrics.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/add-logging-to-tracking-simulator.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/extend-sqlite-tuning-in-database.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/fix-route-handling-in-routing.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/handle-api-response-errors-in-routing.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/refactor-database-path-handling-in-database.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-fcm-message-construction-in-notifications.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-role-check-in-ws.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/logs/refs/heads/codex/update-user-seed-in-database.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-environment-setup-in-conftest.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-geocode.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-route_metrics.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/add-logging-to-tracking-simulator.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/extend-sqlite-tuning-in-database.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/fix-route-handling-in-routing.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/handle-api-response-errors-in-routing.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/refactor-database-path-handling-in-database.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-fcm-message-construction-in-notifications.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-role-check-in-ws.py
	new file:   apps/gitea/data/git/repositories/beatzaplenty/limo-booking-app.git/refs/heads/codex/update-user-seed-in-database.py
	renamed:    gitea/docker-compose.yml -> apps/gitea/docker-compose.yml
	new file:   apps/gramps/docker-compose.yml
	renamed:    nextcloud/Dockerfile -> apps/nextcloud/Dockerfile
	new file:   apps/nextcloud/docker-compose.yml
	renamed:    passbolt/Dockerfile -> apps/passbolt/Dockerfile
	renamed:    passbolt/docker-compose.yml -> apps/passbolt/docker-compose.yml
	renamed:    searxng/Dockerfile -> apps/searxng/Dockerfile
	renamed:    searxng/docker-compose.yml -> apps/searxng/docker-compose.yml
	renamed:    searxng/dockerfiles/docker-entrypoint.sh -> apps/searxng/dockerfiles/docker-entrypoint.sh
	renamed:    searxng/docs/conf.py -> apps/searxng/docs/conf.py
	renamed:    searxng/docs/user/.gitignore -> apps/searxng/docs/user/.gitignore
	renamed:    searxng/examples/basic_engine.py -> apps/searxng/examples/basic_engine.py
	renamed:    searxng/searx/__init__.py -> apps/searxng/searx/__init__.py
	renamed:    searxng/searx/answerers/__init__.py -> apps/searxng/searx/answerers/__init__.py
	renamed:    searxng/searx/answerers/random/answerer.py -> apps/searxng/searx/answerers/random/answerer.py
	renamed:    searxng/searx/answerers/statistics/answerer.py -> apps/searxng/searx/answerers/statistics/answerer.py
	renamed:    searxng/searx/autocomplete.py -> apps/searxng/searx/autocomplete.py
	renamed:    searxng/searx/babel_extract.py -> apps/searxng/searx/babel_extract.py
	renamed:    searxng/searx/botdetection/__init__.py -> apps/searxng/searx/botdetection/__init__.py
	renamed:    searxng/searx/botdetection/_helpers.py -> apps/searxng/searx/botdetection/_helpers.py
	renamed:    searxng/searx/botdetection/http_accept.py -> apps/searxng/searx/botdetection/http_accept.py
	renamed:    searxng/searx/botdetection/http_accept_encoding.py -> apps/searxng/searx/botdetection/http_accept_encoding.py
	renamed:    searxng/searx/botdetection/http_accept_language.py -> apps/searxng/searx/botdetection/http_accept_language.py
	renamed:    searxng/searx/botdetection/http_connection.py -> apps/searxng/searx/botdetection/http_connection.py
	renamed:    searxng/searx/botdetection/http_user_agent.py -> apps/searxng/searx/botdetection/http_user_agent.py
	renamed:    searxng/searx/botdetection/ip_limit.py -> apps/searxng/searx/botdetection/ip_limit.py
	renamed:    searxng/searx/botdetection/ip_lists.py -> apps/searxng/searx/botdetection/ip_lists.py
	renamed:    searxng/searx/botdetection/limiter.py -> apps/searxng/searx/botdetection/limiter.py
	renamed:    searxng/searx/botdetection/link_token.py -> apps/searxng/searx/botdetection/link_token.py
	renamed:    searxng/searx/compat.py -> apps/searxng/searx/compat.py
	renamed:    searxng/searx/data/__init__.py -> apps/searxng/searx/data/__init__.py
	renamed:    searxng/searx/enginelib/__init__.py -> apps/searxng/searx/enginelib/__init__.py
	renamed:    searxng/searx/enginelib/traits.py -> apps/searxng/searx/enginelib/traits.py
	renamed:    searxng/searx/engines/1337x.py -> apps/searxng/searx/engines/1337x.py
	renamed:    searxng/searx/engines/9gag.py -> apps/searxng/searx/engines/9gag.py
	renamed:    searxng/searx/engines/__init__.py -> apps/searxng/searx/engines/__init__.py
	renamed:    searxng/searx/engines/ahmia.py -> apps/searxng/searx/engines/ahmia.py
	renamed:    searxng/searx/engines/annas_archive.py -> apps/searxng/searx/engines/annas_archive.py
	renamed:    searxng/searx/engines/apkmirror.py -> apps/searxng/searx/engines/apkmirror.py
	renamed:    searxng/searx/engines/apple_app_store.py -> apps/searxng/searx/engines/apple_app_store.py
	renamed:    searxng/searx/engines/apple_maps.py -> apps/searxng/searx/engines/apple_maps.py
	renamed:    searxng/searx/engines/archlinux.py -> apps/searxng/searx/engines/archlinux.py
	renamed:    searxng/searx/engines/artic.py -> apps/searxng/searx/engines/artic.py
	renamed:    searxng/searx/engines/arxiv.py -> apps/searxng/searx/engines/arxiv.py
	renamed:    searxng/searx/engines/bandcamp.py -> apps/searxng/searx/engines/bandcamp.py
	renamed:    searxng/searx/engines/base.py -> apps/searxng/searx/engines/base.py
	renamed:    searxng/searx/engines/bing.py -> apps/searxng/searx/engines/bing.py
	renamed:    searxng/searx/engines/bing_images.py -> apps/searxng/searx/engines/bing_images.py
	renamed:    searxng/searx/engines/bing_news.py -> apps/searxng/searx/engines/bing_news.py
	renamed:    searxng/searx/engines/bing_videos.py -> apps/searxng/searx/engines/bing_videos.py
	renamed:    searxng/searx/engines/brave.py -> apps/searxng/searx/engines/brave.py
	renamed:    searxng/searx/engines/bt4g.py -> apps/searxng/searx/engines/bt4g.py
	renamed:    searxng/searx/engines/btdigg.py -> apps/searxng/searx/engines/btdigg.py
	renamed:    searxng/searx/engines/command.py -> apps/searxng/searx/engines/command.py
	renamed:    searxng/searx/engines/core.py -> apps/searxng/searx/engines/core.py
	renamed:    searxng/searx/engines/crossref.py -> apps/searxng/searx/engines/crossref.py
	renamed:    searxng/searx/engines/currency_convert.py -> apps/searxng/searx/engines/currency_convert.py
	renamed:    searxng/searx/engines/dailymotion.py -> apps/searxng/searx/engines/dailymotion.py
	renamed:    searxng/searx/engines/deepl.py -> apps/searxng/searx/engines/deepl.py
	renamed:    searxng/searx/engines/deezer.py -> apps/searxng/searx/engines/deezer.py
	renamed:    searxng/searx/engines/demo_offline.py -> apps/searxng/searx/engines/demo_offline.py
	renamed:    searxng/searx/engines/demo_online.py -> apps/searxng/searx/engines/demo_online.py
	renamed:    searxng/searx/engines/deviantart.py -> apps/searxng/searx/engines/deviantart.py
	renamed:    searxng/searx/engines/dictzone.py -> apps/searxng/searx/engines/dictzone.py
	renamed:    searxng/searx/engines/digbt.py -> apps/searxng/searx/engines/digbt.py
	renamed:    searxng/searx/engines/docker_hub.py -> apps/searxng/searx/engines/docker_hub.py
	renamed:    searxng/searx/engines/doku.py -> apps/searxng/searx/engines/doku.py
	renamed:    searxng/searx/engines/duckduckgo.py -> apps/searxng/searx/engines/duckduckgo.py
	renamed:    searxng/searx/engines/duckduckgo_definitions.py -> apps/searxng/searx/engines/duckduckgo_definitions.py
	renamed:    searxng/searx/engines/duckduckgo_images.py -> apps/searxng/searx/engines/duckduckgo_images.py
	renamed:    searxng/searx/engines/duckduckgo_weather.py -> apps/searxng/searx/engines/duckduckgo_weather.py
	renamed:    searxng/searx/engines/duden.py -> apps/searxng/searx/engines/duden.py
	renamed:    searxng/searx/engines/dummy-offline.py -> apps/searxng/searx/engines/dummy-offline.py
	renamed:    searxng/searx/engines/dummy.py -> apps/searxng/searx/engines/dummy.py
	renamed:    searxng/searx/engines/ebay.py -> apps/searxng/searx/engines/ebay.py
	renamed:    searxng/searx/engines/elasticsearch.py -> apps/searxng/searx/engines/elasticsearch.py
	renamed:    searxng/searx/engines/emojipedia.py -> apps/searxng/searx/engines/emojipedia.py
	renamed:    searxng/searx/engines/fdroid.py -> apps/searxng/searx/engines/fdroid.py
	renamed:    searxng/searx/engines/flickr.py -> apps/searxng/searx/engines/flickr.py
	renamed:    searxng/searx/engines/flickr_noapi.py -> apps/searxng/searx/engines/flickr_noapi.py
	renamed:    searxng/searx/engines/framalibre.py -> apps/searxng/searx/engines/framalibre.py
	renamed:    searxng/searx/engines/freesound.py -> apps/searxng/searx/engines/freesound.py
	renamed:    searxng/searx/engines/frinkiac.py -> apps/searxng/searx/engines/frinkiac.py
	renamed:    searxng/searx/engines/genius.py -> apps/searxng/searx/engines/genius.py
	renamed:    searxng/searx/engines/gentoo.py -> apps/searxng/searx/engines/gentoo.py
	renamed:    searxng/searx/engines/github.py -> apps/searxng/searx/engines/github.py
	renamed:    searxng/searx/engines/google.py -> apps/searxng/searx/engines/google.py
	renamed:    searxng/searx/engines/google_images.py -> apps/searxng/searx/engines/google_images.py
	renamed:    searxng/searx/engines/google_news.py -> apps/searxng/searx/engines/google_news.py
	renamed:    searxng/searx/engines/google_play.py -> apps/searxng/searx/engines/google_play.py
	renamed:    searxng/searx/engines/google_scholar.py -> apps/searxng/searx/engines/google_scholar.py
	renamed:    searxng/searx/engines/google_videos.py -> apps/searxng/searx/engines/google_videos.py
	renamed:    searxng/searx/engines/imdb.py -> apps/searxng/searx/engines/imdb.py
	renamed:    searxng/searx/engines/ina.py -> apps/searxng/searx/engines/ina.py
	renamed:    searxng/searx/engines/invidious.py -> apps/searxng/searx/engines/invidious.py
	renamed:    searxng/searx/engines/jisho.py -> apps/searxng/searx/engines/jisho.py
	renamed:    searxng/searx/engines/json_engine.py -> apps/searxng/searx/engines/json_engine.py
	renamed:    searxng/searx/engines/kickass.py -> apps/searxng/searx/engines/kickass.py
	renamed:    searxng/searx/engines/lemmy.py -> apps/searxng/searx/engines/lemmy.py
	renamed:    searxng/searx/engines/lingva.py -> apps/searxng/searx/engines/lingva.py
	renamed:    searxng/searx/engines/loc.py -> apps/searxng/searx/engines/loc.py
	renamed:    searxng/searx/engines/mediathekviewweb.py -> apps/searxng/searx/engines/mediathekviewweb.py
	renamed:    searxng/searx/engines/mediawiki.py -> apps/searxng/searx/engines/mediawiki.py
	renamed:    searxng/searx/engines/meilisearch.py -> apps/searxng/searx/engines/meilisearch.py
	renamed:    searxng/searx/engines/metacpan.py -> apps/searxng/searx/engines/metacpan.py
	renamed:    searxng/searx/engines/mixcloud.py -> apps/searxng/searx/engines/mixcloud.py
	renamed:    searxng/searx/engines/mongodb.py -> apps/searxng/searx/engines/mongodb.py
	renamed:    searxng/searx/engines/mysql_server.py -> apps/searxng/searx/engines/mysql_server.py
	renamed:    searxng/searx/engines/nyaa.py -> apps/searxng/searx/engines/nyaa.py
	renamed:    searxng/searx/engines/opensemantic.py -> apps/searxng/searx/engines/opensemantic.py
	renamed:    searxng/searx/engines/openstreetmap.py -> apps/searxng/searx/engines/openstreetmap.py
	renamed:    searxng/searx/engines/openverse.py -> apps/searxng/searx/engines/openverse.py
	renamed:    searxng/searx/engines/pdbe.py -> apps/searxng/searx/engines/pdbe.py
	renamed:    searxng/searx/engines/peertube.py -> apps/searxng/searx/engines/peertube.py
	renamed:    searxng/searx/engines/photon.py -> apps/searxng/searx/engines/photon.py
	renamed:    searxng/searx/engines/piped.py -> apps/searxng/searx/engines/piped.py
	renamed:    searxng/searx/engines/piratebay.py -> apps/searxng/searx/engines/piratebay.py
	renamed:    searxng/searx/engines/postgresql.py -> apps/searxng/searx/engines/postgresql.py
	renamed:    searxng/searx/engines/pubmed.py -> apps/searxng/searx/engines/pubmed.py
	renamed:    searxng/searx/engines/qwant.py -> apps/searxng/searx/engines/qwant.py
	renamed:    searxng/searx/engines/recoll.py -> apps/searxng/searx/engines/recoll.py
	renamed:    searxng/searx/engines/reddit.py -> apps/searxng/searx/engines/reddit.py
	renamed:    searxng/searx/engines/redis_server.py -> apps/searxng/searx/engines/redis_server.py
	renamed:    searxng/searx/engines/rumble.py -> apps/searxng/searx/engines/rumble.py
	renamed:    searxng/searx/engines/scanr_structures.py -> apps/searxng/searx/engines/scanr_structures.py
	renamed:    searxng/searx/engines/searchcode_code.py -> apps/searxng/searx/engines/searchcode_code.py
	renamed:    searxng/searx/engines/searx_engine.py -> apps/searxng/searx/engines/searx_engine.py
	renamed:    searxng/searx/engines/semantic_scholar.py -> apps/searxng/searx/engines/semantic_scholar.py
	renamed:    searxng/searx/engines/sepiasearch.py -> apps/searxng/searx/engines/sepiasearch.py
	renamed:    searxng/searx/engines/seznam.py -> apps/searxng/searx/engines/seznam.py
	renamed:    searxng/searx/engines/sjp.py -> apps/searxng/searx/engines/sjp.py
	renamed:    searxng/searx/engines/solidtorrents.py -> apps/searxng/searx/engines/solidtorrents.py
	renamed:    searxng/searx/engines/solr.py -> apps/searxng/searx/engines/solr.py
	renamed:    searxng/searx/engines/soundcloud.py -> apps/searxng/searx/engines/soundcloud.py
	renamed:    searxng/searx/engines/spotify.py -> apps/searxng/searx/engines/spotify.py
	renamed:    searxng/searx/engines/springer.py -> apps/searxng/searx/engines/springer.py
	renamed:    searxng/searx/engines/sqlite.py -> apps/searxng/searx/engines/sqlite.py
	renamed:    searxng/searx/engines/stackexchange.py -> apps/searxng/searx/engines/stackexchange.py
	renamed:    searxng/searx/engines/startpage.py -> apps/searxng/searx/engines/startpage.py
	renamed:    searxng/searx/engines/tagesschau.py -> apps/searxng/searx/engines/tagesschau.py
	renamed:    searxng/searx/engines/tineye.py -> apps/searxng/searx/engines/tineye.py
	renamed:    searxng/searx/engines/tokyotoshokan.py -> apps/searxng/searx/engines/tokyotoshokan.py
	renamed:    searxng/searx/engines/torznab.py -> apps/searxng/searx/engines/torznab.py
	renamed:    searxng/searx/engines/translated.py -> apps/searxng/searx/engines/translated.py
	renamed:    searxng/searx/engines/twitter.py -> apps/searxng/searx/engines/twitter.py
	renamed:    searxng/searx/engines/unsplash.py -> apps/searxng/searx/engines/unsplash.py
	renamed:    searxng/searx/engines/vimeo.py -> apps/searxng/searx/engines/vimeo.py
	renamed:    searxng/searx/engines/wikidata.py -> apps/searxng/searx/engines/wikidata.py
	renamed:    searxng/searx/engines/wikipedia.py -> apps/searxng/searx/engines/wikipedia.py
	renamed:    searxng/searx/engines/wolframalpha_api.py -> apps/searxng/searx/engines/wolframalpha_api.py
	renamed:    searxng/searx/engines/wolframalpha_noapi.py -> apps/searxng/searx/engines/wolframalpha_noapi.py
	renamed:    searxng/searx/engines/wordnik.py -> apps/searxng/searx/engines/wordnik.py
	renamed:    searxng/searx/engines/wttr.py -> apps/searxng/searx/engines/wttr.py
	renamed:    searxng/searx/engines/www1x.py -> apps/searxng/searx/engines/www1x.py
	renamed:    searxng/searx/engines/xpath.py -> apps/searxng/searx/engines/xpath.py
	renamed:    searxng/searx/engines/yacy.py -> apps/searxng/searx/engines/yacy.py
	renamed:    searxng/searx/engines/yahoo.py -> apps/searxng/searx/engines/yahoo.py
	renamed:    searxng/searx/engines/yahoo_news.py -> apps/searxng/searx/engines/yahoo_news.py
	renamed:    searxng/searx/engines/youtube_api.py -> apps/searxng/searx/engines/youtube_api.py
	renamed:    searxng/searx/engines/youtube_noapi.py -> apps/searxng/searx/engines/youtube_noapi.py
	renamed:    searxng/searx/engines/zlibrary.py -> apps/searxng/searx/engines/zlibrary.py
	renamed:    searxng/searx/exceptions.py -> apps/searxng/searx/exceptions.py
	renamed:    searxng/searx/external_bang.py -> apps/searxng/searx/external_bang.py
	renamed:    searxng/searx/external_urls.py -> apps/searxng/searx/external_urls.py
	renamed:    searxng/searx/flaskfix.py -> apps/searxng/searx/flaskfix.py
	renamed:    searxng/searx/infopage/__init__.py -> apps/searxng/searx/infopage/__init__.py
	renamed:    searxng/searx/locales.py -> apps/searxng/searx/locales.py
	renamed:    searxng/searx/metrics/__init__.py -> apps/searxng/searx/metrics/__init__.py
	renamed:    searxng/searx/metrics/error_recorder.py -> apps/searxng/searx/metrics/error_recorder.py
	renamed:    searxng/searx/metrics/models.py -> apps/searxng/searx/metrics/models.py
	renamed:    searxng/searx/network/__init__.py -> apps/searxng/searx/network/__init__.py
	renamed:    searxng/searx/network/client.py -> apps/searxng/searx/network/client.py
	renamed:    searxng/searx/network/network.py -> apps/searxng/searx/network/network.py
	renamed:    searxng/searx/network/raise_for_httperror.py -> apps/searxng/searx/network/raise_for_httperror.py
	renamed:    searxng/searx/plugins/__init__.py -> apps/searxng/searx/plugins/__init__.py
	renamed:    searxng/searx/plugins/ahmia_filter.py -> apps/searxng/searx/plugins/ahmia_filter.py
	renamed:    searxng/searx/plugins/hash_plugin.py -> apps/searxng/searx/plugins/hash_plugin.py
	renamed:    searxng/searx/plugins/hostname_replace.py -> apps/searxng/searx/plugins/hostname_replace.py
	renamed:    searxng/searx/plugins/limiter.py -> apps/searxng/searx/plugins/limiter.py
	renamed:    searxng/searx/plugins/oa_doi_rewrite.py -> apps/searxng/searx/plugins/oa_doi_rewrite.py
	renamed:    searxng/searx/plugins/search_on_category_select.py -> apps/searxng/searx/plugins/search_on_category_select.py
	renamed:    searxng/searx/plugins/self_info.py -> apps/searxng/searx/plugins/self_info.py
	renamed:    searxng/searx/plugins/tor_check.py -> apps/searxng/searx/plugins/tor_check.py
	renamed:    searxng/searx/plugins/tracker_url_remover.py -> apps/searxng/searx/plugins/tracker_url_remover.py
	renamed:    searxng/searx/plugins/vim_hotkeys.py -> apps/searxng/searx/plugins/vim_hotkeys.py
	renamed:    searxng/searx/preferences.py -> apps/searxng/searx/preferences.py
	renamed:    searxng/searx/query.py -> apps/searxng/searx/query.py
	renamed:    searxng/searx/redisdb.py -> apps/searxng/searx/redisdb.py
	renamed:    searxng/searx/redislib.py -> apps/searxng/searx/redislib.py
	renamed:    searxng/searx/results.py -> apps/searxng/searx/results.py
	renamed:    searxng/searx/search/__init__.py -> apps/searxng/searx/search/__init__.py
	renamed:    searxng/searx/search/checker/__init__.py -> apps/searxng/searx/search/checker/__init__.py
	renamed:    searxng/searx/search/checker/__main__.py -> apps/searxng/searx/search/checker/__main__.py
	renamed:    searxng/searx/search/checker/background.py -> apps/searxng/searx/search/checker/background.py
	renamed:    searxng/searx/search/checker/impl.py -> apps/searxng/searx/search/checker/impl.py
	renamed:    searxng/searx/search/checker/scheduler.py -> apps/searxng/searx/search/checker/scheduler.py
	renamed:    searxng/searx/search/models.py -> apps/searxng/searx/search/models.py
	renamed:    searxng/searx/search/processors/__init__.py -> apps/searxng/searx/search/processors/__init__.py
	renamed:    searxng/searx/search/processors/abstract.py -> apps/searxng/searx/search/processors/abstract.py
	renamed:    searxng/searx/search/processors/offline.py -> apps/searxng/searx/search/processors/offline.py
	renamed:    searxng/searx/search/processors/online.py -> apps/searxng/searx/search/processors/online.py
	renamed:    searxng/searx/search/processors/online_currency.py -> apps/searxng/searx/search/processors/online_currency.py
	renamed:    searxng/searx/search/processors/online_dictionary.py -> apps/searxng/searx/search/processors/online_dictionary.py
	renamed:    searxng/searx/search/processors/online_url_search.py -> apps/searxng/searx/search/processors/online_url_search.py
	renamed:    searxng/searx/settings.yml -> apps/searxng/searx/settings.yml
	renamed:    searxng/searx/settings_defaults.py -> apps/searxng/searx/settings_defaults.py
	renamed:    searxng/searx/settings_loader.py -> apps/searxng/searx/settings_loader.py
	renamed:    searxng/searx/static/plugins/external_plugins/.gitignore -> apps/searxng/searx/static/plugins/external_plugins/.gitignore
	renamed:    searxng/searx/static/themes/simple/.gitattributes -> apps/searxng/searx/static/themes/simple/.gitattributes
	renamed:    searxng/searx/static/themes/simple/.gitignore -> apps/searxng/searx/static/themes/simple/.gitignore
	renamed:    searxng/searx/sxng_locales.py -> apps/searxng/searx/sxng_locales.py
	renamed:    searxng/searx/tools/__init__.py -> apps/searxng/searx/tools/__init__.py
	renamed:    searxng/searx/tools/config.py -> apps/searxng/searx/tools/config.py
	renamed:    searxng/searx/unixthreadname.py -> apps/searxng/searx/unixthreadname.py
	renamed:    searxng/searx/utils.py -> apps/searxng/searx/utils.py
	renamed:    searxng/searx/version.py -> apps/searxng/searx/version.py
	renamed:    searxng/searx/webadapter.py -> apps/searxng/searx/webadapter.py
	renamed:    searxng/searx/webapp.py -> apps/searxng/searx/webapp.py
	renamed:    searxng/searx/webutils.py -> apps/searxng/searx/webutils.py
	renamed:    searxng/searxng_extra/__init__.py -> apps/searxng/searxng_extra/__init__.py
	renamed:    searxng/searxng_extra/standalone_searx.py -> apps/searxng/searxng_extra/standalone_searx.py
	renamed:    searxng/searxng_extra/update/__init__.py -> apps/searxng/searxng_extra/update/__init__.py
	renamed:    searxng/searxng_extra/update/update_ahmia_blacklist.py -> apps/searxng/searxng_extra/update/update_ahmia_blacklist.py
	renamed:    searxng/searxng_extra/update/update_currencies.py -> apps/searxng/searxng_extra/update/update_currencies.py
	renamed:    searxng/searxng_extra/update/update_engine_descriptions.py -> apps/searxng/searxng_extra/update/update_engine_descriptions.py
	renamed:    searxng/searxng_extra/update/update_engine_traits.py -> apps/searxng/searxng_extra/update/update_engine_traits.py
	renamed:    searxng/searxng_extra/update/update_external_bangs.py -> apps/searxng/searxng_extra/update/update_external_bangs.py
	renamed:    searxng/searxng_extra/update/update_firefox_version.py -> apps/searxng/searxng_extra/update/update_firefox_version.py
	renamed:    searxng/searxng_extra/update/update_osm_keys_tags.py -> apps/searxng/searxng_extra/update/update_osm_keys_tags.py
	renamed:    searxng/searxng_extra/update/update_pygments.py -> apps/searxng/searxng_extra/update/update_pygments.py
	renamed:    searxng/searxng_extra/update/update_wikidata_units.py -> apps/searxng/searxng_extra/update/update_wikidata_units.py
	renamed:    searxng/setup.py -> apps/searxng/setup.py
	renamed:    searxng/tests/__init__.py -> apps/searxng/tests/__init__.py
	renamed:    searxng/tests/robot/__init__.py -> apps/searxng/tests/robot/__init__.py
	renamed:    searxng/tests/robot/__main__.py -> apps/searxng/tests/robot/__main__.py
	renamed:    searxng/tests/robot/settings_robot.yml -> apps/searxng/tests/robot/settings_robot.yml
	renamed:    searxng/tests/robot/test_webapp.py -> apps/searxng/tests/robot/test_webapp.py
	renamed:    searxng/tests/unit/__init__.py -> apps/searxng/tests/unit/__init__.py
	renamed:    searxng/tests/unit/engines/test_command.py -> apps/searxng/tests/unit/engines/test_command.py
	renamed:    searxng/tests/unit/engines/test_xpath.py -> apps/searxng/tests/unit/engines/test_xpath.py
	renamed:    searxng/tests/unit/network/__init__.py -> apps/searxng/tests/unit/network/__init__.py
	renamed:    searxng/tests/unit/network/test_network.py -> apps/searxng/tests/unit/network/test_network.py
	renamed:    searxng/tests/unit/settings/empty_settings.yml -> apps/searxng/tests/unit/settings/empty_settings.yml
	renamed:    searxng/tests/unit/settings/syntaxerror_settings.yml -> apps/searxng/tests/unit/settings/syntaxerror_settings.yml
	renamed:    searxng/tests/unit/settings/test_settings.yml -> apps/searxng/tests/unit/settings/test_settings.yml
	renamed:    searxng/tests/unit/settings/user_settings.yml -> apps/searxng/tests/unit/settings/user_settings.yml
	renamed:    searxng/tests/unit/settings/user_settings_keep_only.yml -> apps/searxng/tests/unit/settings/user_settings_keep_only.yml
	renamed:    searxng/tests/unit/settings/user_settings_remove.yml -> apps/searxng/tests/unit/settings/user_settings_remove.yml
	renamed:    searxng/tests/unit/settings/user_settings_remove2.yml -> apps/searxng/tests/unit/settings/user_settings_remove2.yml
	renamed:    searxng/tests/unit/settings/user_settings_simple.yml -> apps/searxng/tests/unit/settings/user_settings_simple.yml
	renamed:    searxng/tests/unit/test_answerers.py -> apps/searxng/tests/unit/test_answerers.py
	renamed:    searxng/tests/unit/test_engines_init.py -> apps/searxng/tests/unit/test_engines_init.py
	renamed:    searxng/tests/unit/test_exceptions.py -> apps/searxng/tests/unit/test_exceptions.py
	renamed:    searxng/tests/unit/test_external_bangs.py -> apps/searxng/tests/unit/test_external_bangs.py
	renamed:    searxng/tests/unit/test_locales.py -> apps/searxng/tests/unit/test_locales.py
	renamed:    searxng/tests/unit/test_plugins.py -> apps/searxng/tests/unit/test_plugins.py
	renamed:    searxng/tests/unit/test_preferences.py -> apps/searxng/tests/unit/test_preferences.py
	renamed:    searxng/tests/unit/test_query.py -> apps/searxng/tests/unit/test_query.py
	renamed:    searxng/tests/unit/test_results.py -> apps/searxng/tests/unit/test_results.py
	renamed:    searxng/tests/unit/test_search.py -> apps/searxng/tests/unit/test_search.py
	renamed:    searxng/tests/unit/test_settings_loader.py -> apps/searxng/tests/unit/test_settings_loader.py
	renamed:    searxng/tests/unit/test_utils.py -> apps/searxng/tests/unit/test_utils.py
	renamed:    searxng/tests/unit/test_webadapter.py -> apps/searxng/tests/unit/test_webadapter.py
	renamed:    searxng/tests/unit/test_webapp.py -> apps/searxng/tests/unit/test_webapp.py
	renamed:    searxng/tests/unit/test_webutils.py -> apps/searxng/tests/unit/test_webutils.py
	renamed:    searxng/utils/build_env.py -> apps/searxng/utils/build_env.py
	renamed:    searxng/utils/filtron.sh -> apps/searxng/utils/filtron.sh
	renamed:    searxng/utils/lib.sh -> apps/searxng/utils/lib.sh
	renamed:    searxng/utils/lib_go.sh -> apps/searxng/utils/lib_go.sh
	renamed:    searxng/utils/lib_nvm.sh -> apps/searxng/utils/lib_nvm.sh
	renamed:    searxng/utils/lib_redis.sh -> apps/searxng/utils/lib_redis.sh
	renamed:    searxng/utils/lib_sxng_data.sh -> apps/searxng/utils/lib_sxng_data.sh
	renamed:    searxng/utils/lib_sxng_node.sh -> apps/searxng/utils/lib_sxng_node.sh
	renamed:    searxng/utils/lib_sxng_static.sh -> apps/searxng/utils/lib_sxng_static.sh
	renamed:    searxng/utils/lib_sxng_test.sh -> apps/searxng/utils/lib_sxng_test.sh
	renamed:    searxng/utils/lib_sxng_themes.sh -> apps/searxng/utils/lib_sxng_themes.sh
	renamed:    searxng/utils/lib_sxng_weblate.sh -> apps/searxng/utils/lib_sxng_weblate.sh
	renamed:    searxng/utils/lxc.sh -> apps/searxng/utils/lxc.sh
	renamed:    searxng/utils/morty.sh -> apps/searxng/utils/morty.sh
	renamed:    searxng/utils/searx.sh -> apps/searxng/utils/searx.sh
	renamed:    searxng/utils/searxng.sh -> apps/searxng/utils/searxng.sh
	renamed:    searxng/utils/searxng_check.py -> apps/searxng/utils/searxng_check.py
	renamed:    searxng/utils/templates/etc/searxng/settings.yml -> apps/searxng/utils/templates/etc/searxng/settings.yml
	new file:   apps/shift-recorder
	new file:   apps/stockfill
	new file:   core/authelia/configuration.yml
	new file:   core/authelia/users_database.yml
	new file:   core/crowdsec/Dockerfile
	new file:   core/crowdsec/data/detect.yaml
	new file:   core/docker-compose.yml
	new file:   core/test/Dockerfile
	new file:   core/test/docker-compose.yml
	new file:   core/test/exporter.py
	new file:   core/traefik/data/dynamic.yaml
	renamed:    traefik/data/plugins.yaml -> core/traefik/data/plugins.yaml
	new file:   core/traefik/dynamic.yml
	new file:   core/traefik/traefik.yml
	new file:   default-network.yml
	new file:   monitoring/docker-exporter/Dockerfile
	new file:   monitoring/docker-exporter/exporter.py
	new file:   monitoring/gotify/docker-compose.yml
	new file:   monitoring/gotify/docker-health-to-gotify.sh
	new file:   monitoring/grafana/docker-compose.yml
	new file:   monitoring/node-red/Dockerfile
	new file:   monitoring/node-red/data/test-container.sh
	new file:   monitoring/node-red/docker-compose.yml
	new file:   monitoring/portainer/docker-compose.yml
	new file:   monitoring/prometheus/docker-compose.yml
	new file:   monitoring/prometheus/prometheus.yml
	new file:   monitoring/prometheus/rules/alerts.yml
	new file:   monitoring/uptime-kuma/docker-compose.yml
	deleted:    nextcloud/docker-compose.yml
	new file:   services-up.sh
	deleted:    traefik/docker-compose.yml
	deleted:    traefik/traefik.Dockerfile
	modified:   update-containers.py
	modified:   update-containers.sh

	modified:   apps/shift-recorder (modified content)
	modified:   apps/stockfill (modified content)
2026-03-31 19:59:49 +10:00
558 changed files with 17675 additions and 42733 deletions

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
# Copy this file to default-environment.env (non-secret defaults) and update values.
PROJECT_ROOT=/path/to/docker
DOMAIN=example.com
TZ=Etc/UTC
EMAIL=admin@example.com
# Required secret file path used by compose services.
# Create this file from secrets/.env.secrets.example and keep it out of git.
SECRETS_ENV_FILE=${PROJECT_ROOT}/secrets/stack-secrets.env
+71
View File
@@ -0,0 +1,71 @@
name: Generate Docs
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
jobs:
generate:
runs-on: ubuntu-latest
env:
DOCKER_HOST: tcp://docker-socket-proxy:2375
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install docker CLI
run: |
apt-get update
apt-get install -y docker.io docker-compose
- name: Generate docs
run: |
scripts/docs/generate-all.sh
- name: Validate generated docs
run: |
set -e
test -s docs/generated/docker-compose.resolved.yml
test -s docs/generated/host-topology.md
test -s docs/public/physical-topology.svg
test -s docs/public/docker-traefik-dynu.svg
! grep -R "Host inventory JSON not found" docs/public docs/diagrams
! grep -R "Generate terraform inventory" docs/public docs/diagrams
# Ensure no obvious secrets leaked
! grep -R -E -i "password|token|api[_-]?key|secret" docs/public \
|| (echo "Secret-like string detected"; exit 1)
- name: Commit changes
run: |
git config user.name "docs-bot"
git config user.email "docs-bot@local"
git add docs/generated docs/diagrams docs/public data/terraform/proxmox-inventory.json || true
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
fi
git commit -m "docs: regenerate documentation artifacts"
- name: Push to Gitea
run: |
git push origin HEAD:main
- name: Push to GitHub mirror
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_PUSH_TOKEN }}
GITHUB_MIRROR_REPO: ${{ vars.GITHUB_MIRROR_REPO }}
run: |
test -n "$GITHUB_TOKEN"
test -n "$GITHUB_MIRROR_REPO"
git remote add github "https://$GITHUB_TOKEN@github.com/$GITHUB_MIRROR_REPO.git" || true
git push github HEAD:main
+24
View File
@@ -0,0 +1,24 @@
name: Validate Docs (Gitea)
on:
push:
branches: [ main ]
paths:
- "docs/**"
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate docs
run: |
set -e
test -d docs/public
test -s docs/public/physical-topology.svg
! grep -R "Host inventory JSON not found" docs/public
! grep -R "Generate terraform inventory" docs/public
+35
View File
@@ -0,0 +1,35 @@
name: Validate committed public docs
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
validate-public-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ensure committed docs/public exists
run: |
test -d docs/public
test -n "$(find docs/public -mindepth 1 -print -quit)"
- name: Install MkDocs
run: |
python3 -m pip install --user mkdocs
- name: Validate docs content
run: |
set -e
test -s docs/public/physical-topology.svg
test -s docs/public/docker-traefik-dynu.svg
! grep -R "Host inventory JSON not found" docs/public
! grep -R "Generate terraform inventory" docs/public
! rg -n -i "password|token|api[_-]?key|secret" docs/public
- name: Build MkDocs site
run: |
python3 -m mkdocs build -f mkdocs-public.yml --strict
+84
View File
@@ -0,0 +1,84 @@
name: Publish documentation site
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Ensure committed docs/public exists
run: |
test -d docs/public
test -n "$(find docs/public -mindepth 1 -print -quit)"
- name: Install Graphviz
run: |
sudo apt-get update
sudo apt-get install -y graphviz
dot -V
- name: Validate sanitized diagram artifacts
run: |
test -f docs/public/physical-topology.svg
test -f docs/public/docker-traefik-dynu.svg
! rg -n "Graphviz dot not found" docs/public/*.svg
! rg -n "lan\.ddnsgeek\.com" docs/public/*.svg docs/public/*.md
! rg -n -i "password|token|api_key|secret" docs/public/*.svg
- name: Install MkDocs
run: |
python3 -m pip install --user mkdocs
- name: Build public MkDocs site
run: |
python3 -m mkdocs build -f mkdocs-public.yml --strict
- name: Verify published content excludes internal/generated docs
run: |
test -d site-public
test ! -e site-public/generated
test ! -e site-public/docker
- name: Verify expected 404-only paths are not generated
run: |
test ! -e site-public/generated/compose-inventory/index.html
test ! -e site-public/generated/prometheus-rules/index.html
test ! -e site-public/docker/index.html
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: site-public
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+52 -15
View File
@@ -1,16 +1,53 @@
# ignore all files and directories
*
# allow git to enter directories
!*/
venv/
# keep essential project files
!.gitignore
!.gitattributes
#*
#!**/
#!.gitignore
#!**/Dockerfile
#!docker-compose.yml
**/data/
apps/gitea/runner-data/
**/db/
**/database/
apps/nextcloud/config/
core/crowdsec/config/
**/.env
!monitoring/node-red/data/
apps/stockfill
apps/shift-recorder/
# allow YAMLs, shell scripts, and others
!*.yml
!*.yaml
!*.sh
!*.py
!*.Dockerfile
!Dockerfile
!apps/searxng/
apps/searxng/*
!apps/searxng/Dockerfile
!apps/searxng/docker-compose.yml
venv/
core/authelia/users_database.yml
monitoring/influxdb/*
!monitoring/influxdb/docker-compose.yml
secrets/*
!secrets/.env.secrets.example
!secrets/inventory.json
!.env.example
core/traefik/certs/*
!core/traefik/certs/.gitkeep
site/
# Docs generation artifacts intentionally tracked
!data/terraform/proxmox-inventory.json
!infrastructure/terraform/dynu/generated/
!infrastructure/terraform/dynu/generated/dynu_dns_records_inventory.json
!docs/generated/
!docs/generated/docker-compose.resolved.yml
!docs/generated/host-topology.md
!docs/diagrams/
!docs/diagrams/*.svg
!docs/public/
!docs/public/*.md
!docs/public/*.svg
# Terraform local/state artifacts
**/.terraform/
**/.terraform.lock.hcl
*.tfstate
*.tfstate.*
*.tfvars
*.tfvars.json
+73
View File
@@ -0,0 +1,73 @@
# Git internals accidentally nested in subprojects
# Gramps persistent data and postgres cluster
apps/gramps/data/
apps/gramps/db/
# Nextcloud persistent data
apps/nextcloud/data/
apps/nextcloud/database/
apps/nextcloud/config/
# Passbolt secrets and database
apps/passbolt/data/
# Android / Gradle build artifacts
apps/shift-recorder/.gradle/
apps/shift-recorder/app/build/
apps/shift-recorder/build/
apps/shift-recorder/app-release-*.apk
apps/shift-recorder/app-release-*.aab
apps/shift-recorder/*.idsig
apps/shift-recorder/android.keystore
apps/shift-recorder/manifest-checksum.txt
apps/stockfill/.gradle/
apps/stockfill/app/build/
apps/stockfill/build/
apps/stockfill/app-release-*.apk
apps/stockfill/app-release-*.aab
apps/stockfill/*.idsig
apps/stockfill/android.keystore
apps/stockfill/manifest-checksum.txt
# Node / frontend artifacts
**/node_modules/
**/dist/
**/.vite/
**/coverage/
**/playwright-report/
**/test-results/
# Python artifacts
**/__pycache__/
**/*.pyc
# IDE files
**/.vscode/
apps/shift-recorder/
#!apps/shift-recorder/.vscode/launch.json
apps/stockfill/
#!apps/stockfill/.vscode/launch.json
#!apps/stockfill/.vscode/settings.json
# Traefik data
core/traefik/data/
# Authelia sqlite database and notifications
core/authelia/data/
# Crowdsec generated state
core/crowdsec/data/
core/crowdsec/logs/
core/crowdsec/config
# Archived service data
archive/esphome/data/
monitoring/gotify/data/
monitoring/grafana/data/
monitoring/portainer/data/
apps/gitea/data/
apps/searxng/
monitoring/prometheus/data/
monitoring/uptime-kuma/data/
# Keep compose files, Dockerfiles, configs, scripts, and documentation tracked
+27
View File
@@ -0,0 +1,27 @@
# ignore all files and directories
*
# allow git to enter directories
!*/
venv/
core/crowdsec/config
database
data
db
docs
examples
searx
tests
utils
stockfill
shift-recorder
# keep essential project files
!.gitignore
!.gitattributes
# allow YAMLs, shell scripts, and others
!*.yml
!*.yaml
!*.sh
!*.py
!*.Dockerfile
!Dockerfile
+80
View File
@@ -0,0 +1,80 @@
# Codex instructions for this repository
This repository contains:
- Docker Compose infrastructure
- Terraform configuration
- Ansible configuration
## General rules
Prefer validation and linting over execution.
Do not make assumptions about runtime access.
Do not run destructive commands.
Do not install repo changes unless explicitly requested.
## Docker / Compose rules
This environment does not have Docker daemon access.
Do not use commands that require `/var/run/docker.sock`.
Allowed:
- `docker compose config`
- `docker compose -f <file> config`
- `./services-up.sh --profile all config`
Not allowed:
- `docker compose up`
- `docker compose down`
- `docker compose run`
- `docker compose exec`
- `docker build`
- `docker pull`
When validating Docker changes:
1. Prefer `./services-up.sh --profile all config` if available.
2. If that does not fit the task, use `docker compose -f ... config`.
3. Only create temporary placeholder env files if validation requires them.
4. Do not commit placeholder env files unless explicitly requested.
## Terraform rules
Allowed:
- `terraform fmt -check -recursive`
- `terraform init -backend=false -input=false`
- `terraform validate`
- `tflint`
Do not apply infrastructure changes unless explicitly requested.
Do not run:
- `terraform apply`
- `terraform destroy`
If `terraform init` fails because access to `registry.terraform.io` is forbidden, do not summarize the error vaguely. Report the exact stderr. Continue with:
- `terraform fmt -check -recursive`
- static review of changed `.tf` files
Only run `terraform validate` when provider installation is available locally or registry access succeeds.
## Ansible rules
Allowed:
- `ansible-lint`
- `ansible-playbook --syntax-check <playbook>`
Do not run playbooks against real hosts unless explicitly requested.
## Shell / YAML rules
Allowed:
- `shellcheck`
- `yamllint`
- `yq`
- `jq`
## Expected workflow
When making changes:
1. Edit the smallest necessary set of files.
2. Run the safest available validation commands.
3. Report validation results clearly.
4. If validation is blocked by missing secrets, env files, or remote/provider access, say so explicitly instead of guessing.
+188
View File
@@ -0,0 +1,188 @@
# Homelab Docker + Terraform Inventory Repository
This repository is both:
1. **operational** (Docker Compose application/runtime definition), and
2. **documentary/inventory-oriented** (Terraform capture of Proxmox VMs, host metadata, and selected Docker objects).
If you only read one section, read **[Source-of-truth boundaries](docs/source-of-truth.md)** first.
---
## Quick navigation
- Architecture overview: [docs/architecture.md](docs/architecture.md)
- Repository layout: [docs/repo-structure.md](docs/repo-structure.md)
- Source-of-truth boundaries and guardrails: [docs/source-of-truth.md](docs/source-of-truth.md)
- Docker environment composition and `services-up.sh`: [docs/docker-environment.md](docs/docker-environment.md)
- Terraform workflows (brownfield import/reconciliation): [docs/terraform-workflows.md](docs/terraform-workflows.md)
- Infrastructure inventory intent and outputs: [docs/infrastructure-inventory.md](docs/infrastructure-inventory.md)
- Dynu DNS read-only inventory workflow: [docs/dynu-dns-inventory.md](docs/dynu-dns-inventory.md)
- Generated host topology doc: [docs/generated/host-topology.md](docs/generated/host-topology.md)
- Ansible bootstrap workflows: [docs/ansible-workflows.md](docs/ansible-workflows.md)
- Deployment prerequisites and secrets setup: [docs/deployment-prerequisites.md](docs/deployment-prerequisites.md)
- Secrets inventory: [docs/security-secrets.md](docs/security-secrets.md)
Codex helper scripts:
- Initial Codex environment/bootstrap setup: [scripts/codex-setup.sh](scripts/codex-setup.sh)
- Codex environment maintenance/refresh: [scripts/codex-maintenance.sh](scripts/codex-maintenance.sh)
Infrastructure subtrees:
- Ansible foundation docs: [infrastructure/ansible/README.md](infrastructure/ansible/README.md)
- Terraform root docs: [infrastructure/terraform/README.md](infrastructure/terraform/README.md)
- Terraform Docker mirror: [infrastructure/terraform/docker/README.md](infrastructure/terraform/docker/README.md)
- Terraform Proxmox inventory: [infrastructure/terraform/proxmox/README.md](infrastructure/terraform/proxmox/README.md)
---
## Operating model
### Docker Compose (runtime authority)
- Compose files under `core/`, `apps/`, and `monitoring/` describe runtime services.
- `services-up.sh` composes the environment by discovering compose files and applying common env/network inputs.
- For service runtime behavior, start from Compose files and `services-up.sh` (not Terraform).
### Ansible (bootstrap foundation)
- Ansible under `infrastructure/ansible/` is a phase-1 foundation for inventory/configuration scaffolding.
- It supports safe validation (inventory parsing and playbook syntax checks) while hosts/devices are onboarded gradually.
- It does not replace Compose runtime authority or Terraform reconciliation authority at this stage.
### Terraform (inventory and reconciliation authority)
- Terraform under `infrastructure/terraform/` is used to codify and reconcile existing infrastructure.
- Current repo usage emphasizes **brownfield import-first workflows** and safe reconciliation.
- Terraform captures:
- Proxmox VM configuration for existing VMs.
- Physical host metadata in locals/outputs.
- Documentation-oriented Docker container mirroring (limited, selective).
Terraform here is **not** a replacement for Docker Compose deployment.
---
## Guardrails
- Do not run destructive Terraform commands casually.
- Do not treat generated Terraform config as final without manual review.
- Do not commit real secrets, credentials, or local state.
- Keep one-resource-per-file patterns where already established in Terraform subdirectories.
- Prefer shaping outputs for documentation/tooling consumption over dumping raw provider objects.
See [docs/source-of-truth.md](docs/source-of-truth.md) and [docs/terraform-workflows.md](docs/terraform-workflows.md) for concrete do/don't guidance.
---
## High-level architecture
```mermaid
flowchart TB
Internet((Internet Clients)) -->|HTTPS 443 / HTTP 80| Traefik[Traefik Ingress\nACME TLS + Security Middlewares]
subgraph DockerHost[Primary Docker Host]
Traefik
Authelia[Authelia SSO / ForwardAuth]
CrowdSec[CrowdSec + Traefik Bouncer]
ErrPages[Error Pages Fallback]
subgraph Apps[Business / User Applications]
Nextcloud[Nextcloud]
Passbolt[Passbolt]
Gitea[Gitea]
FamilyTree[Gramps Web]
Searxng[SearXNG]
end
subgraph Ops[Operations & Monitoring]
Grafana[Grafana]
Prometheus[Prometheus]
InfluxDB[InfluxDB]
NodeRED[Node-RED]
Portainer[Portainer]
UptimeKuma[Uptime Kuma]
Gotify[Gotify Notifications]
end
end
Traefik --> Apps
Traefik --> Ops
Traefik -->|ForwardAuth for selected routes| Authelia
Traefik -->|Threat decisions| CrowdSec
Traefik -->|4xx/5xx fallback| ErrPages
Prometheus --> Grafana
Prometheus --> Gotify
```
For request-flow and network detail, see [docs/architecture.md](docs/architecture.md).
## Public docs publication workflow
Public docs are generated on the Docker host and committed to this repository. GitHub Actions only publishes committed content from `docs/public`.
1. Generate public docs locally from the repository root:
```bash
./scripts/generate-public-docs.sh
```
2. Inspect the generated changes:
```bash
git diff -- docs/public docs/generated docs/diagrams
```
3. Commit the generated public docs (and any supporting generated files you intend to version):
```bash
git add docs/public docs/generated docs/diagrams
git commit -m "docs: regenerate public docs"
```
4. Push your branch:
```bash
git push
```
Only files under `docs/public` are published by GitHub Pages. Internal/generated documentation is not published unless it is deliberately copied/sanitized into `docs/public`.
### Regenerating architecture docs (Prometheus + Dynu DNS)
```bash
# Refresh Dynu live inventory and generated resources/import helpers
cd infrastructure/terraform/dynu
terraform apply -refresh-only
python3 scripts/generate-brownfield-records.py --overwrite
# Regenerate architecture docs from Prometheus + Dynu inventory
cd ../../..
python3 scripts/render_prometheus_docs.py \
--inventory-file docs/runtime/prometheus-inventory.json \
--dynu-dns-inventory-file infrastructure/terraform/dynu/generated/dynu_dns_records_inventory.json
```
---
## Codex setup and maintenance scripts
The repository includes helper scripts for Codex sessions that need local tooling and safe placeholder secret material for validation-only workflows:
- `scripts/codex-setup.sh`
- Installs baseline CLI dependencies (shell/yaml/terraform/ansible tooling).
- Prepares `secrets/stack-secrets.env` from templates and creates dummy file-based secret placeholders based on `secrets/inventory.json`.
- Installs/refreshed baseline Ansible collections when `infrastructure/ansible/collections/requirements.yml` is present.
- Runs safe Ansible bootstrap checks (version, inventory parse, playbook syntax check) without live connectivity operations.
- Prints installed tool versions for quick verification.
- `scripts/codex-maintenance.sh`
- Refreshes Python-based linting/automation tooling.
- Reconciles placeholder secret files against current `secrets/inventory.json` (creates missing, removes stale).
- Rebuilds `secrets/stack-secrets.env` with dummy values for compose-config validation.
- Refreshes Ansible collections and repeats safe inventory/syntax validation checks.
Both scripts are intended for local validation environments and should not be treated as production provisioning automation.
+55
View File
@@ -0,0 +1,55 @@
# Gitea
## Gitea Actions
Gitea Actions is enabled by setting:
- `GITEA__actions__ENABLED=true`
## Runner service
The repository includes a dedicated Gitea Actions runner service named:
- `gitea-runner`
The runner uses Docker through the existing Docker socket proxy:
- `DOCKER_HOST=tcp://docker-socket-proxy:2375`
The runner intentionally **does not** mount:
- `/var/run/docker.sock`
## Registration token
Generate a runner registration token from the Gitea UI:
- Site Administration → Actions → Runners
- or Repo → Settings → Actions → Runners
Put the token in your env/secrets file:
- `GITEA_RUNNER_REGISTRATION_TOKEN=...`
## Start the runner
- `./services-up.sh --profile gitea up -d gitea-runner`
- or `./services-up.sh --profile all up -d gitea-runner`
## Logs
- `docker logs -f gitea-runner`
## Labels
Common workflow label:
- `runs-on: ubuntu-latest`
This should match the configured labels, for example:
- `GITEA_RUNNER_LABELS=ubuntu-latest:docker://node:20-bookworm,...`
## Security note
The runner can control Docker through `docker-socket-proxy`. This is safer than mounting the raw Docker socket directly, but workflows still have meaningful control over Docker. Only trusted repositories/users should be allowed to run workflows on this runner.
+63
View File
@@ -0,0 +1,63 @@
services:
gitea:
profiles: ["apps","all","gitea"]
container_name: gitea
image: gitea/gitea:latest # change to 1-rootless once find out how to move data.
restart: always
environment:
- USER_UID=${GITEA_USER_UID}
- USER_GID=${GITEA_USER_GID}
- GITEA__database__DB_TYPE=${GITEA_DB_TYPE}
- GITEA__server__ROOT_URL=${GITEA_ROOT_URL}
- GITEA__actions__ENABLED=true
volumes:
# - ${PROJECT_ROOT}/apps/gitea/data:/data
- ${DOCKER_VOLUMES}/gitea/data:/data
networks:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.gitea.rule=Host(`gitea.lan.ddnsgeek.com`)"
- "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls=true"
- "traefik.http.routers.gitea.tls.certresolver=myresolver"
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "io.portainer.accesscontrol.public"
- "traefik.docker.network=core_traefik"
- "wud.watch=true"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz >/dev/null"]
interval: 30s
timeout: 5s
retries: 6
start_period: 120s
gitea-runner:
profiles: ["apps","all","gitea","ci"]
container_name: gitea-runner
image: gitea/act_runner:latest
restart: always
depends_on:
- gitea
- docker-socket-proxy
environment:
- GITEA_INSTANCE_URL=${GITEA_ROOT_URL}
- GITEA_RUNNER_REGISTRATION_TOKEN=${GITEA_RUNNER_REGISTRATION_TOKEN}
- GITEA_RUNNER_NAME=${GITEA_RUNNER_NAME}
- GITEA_RUNNER_LABELS=${GITEA_RUNNER_LABELS}
- DOCKER_HOST=${DOCKER_SOCKET_PROXY_HOST}
volumes:
# - ${PROJECT_ROOT}/apps/gitea/runner-data:/data
- ${DOCKER_VOLUMES}/gitea/runner:/data
networks:
- traefik
- docker-socket-proxy
#volumes:
# gitea_data:
#networks:
# traefik_reverse_proxy:
# external: true
+145
View File
@@ -0,0 +1,145 @@
services:
grampsweb:
profiles: ["apps","all","gramps"]
image: ghcr.io/gramps-project/grampsweb:latest
container_name: gramps-web
depends_on:
- gramps-redis
- grampsweb_celery
restart: always
# env_file:
# - ${SECRETS_ENV_FILE}
environment:
TZ: ${TZ}
GRAMPSWEB_TREE: ${GRAMPSWEB_TREE}
GRAMPSWEB_BASE_URL: ${GRAMPSWEB_BASE_URL}
GRAMPSWEB_SECRET_KEY: ${GRAMPSWEB_SECRET_KEY}
GRAMPSWEB_REGISTRATION_DISABLED: ${GRAMPSWEB_REGISTRATION_DISABLED}
GRAMPSWEB_EMAIL_HOST: ${GRAMPSWEB_EMAIL_HOST}
GRAMPSWEB_EMAIL_PORT: ${GRAMPSWEB_EMAIL_PORT}
GRAMPSWEB_EMAIL_HOST_USER: ${GRAMPSWEB_EMAIL_HOST_USER}
GRAMPSWEB_EMAIL_HOST_PASSWORD: ${GRAMPSWEB_EMAIL_HOST_PASSWORD}
GRAMPSWEB_EMAIL_USE_SSL: ${GRAMPSWEB_EMAIL_USE_SSL}
GRAMPSWEB_EMAIL_USE_STARTTLS: ${GRAMPSWEB_EMAIL_USE_STARTTLS}
GRAMPSWEB_DEFAULT_FROM_EMAIL: ${GRAMPSWEB_DEFAULT_FROM_EMAIL}
GRAMPSWEB_CELERY_CONFIG__broker_url: redis://gramps-redis:6379/0
GRAMPSWEB_CELERY_CONFIG__result_backend: redis://gramps-redis:6379/0
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://gramps-redis:6379/1
volumes:
# - ${PROJECT_ROOT}/apps/gramps/data/users:/app/users
# - ${PROJECT_ROOT}/apps/gramps/data/index:/app/indexdir
# - ${PROJECT_ROOT}/apps/gramps/data/thumbnail_cache:/app/thumbnail_cache
# - ${PROJECT_ROOT}/apps/gramps/data/cache:/app/cache
# - ${PROJECT_ROOT}/apps/gramps/data/secret:/app/secret
# - ${PROJECT_ROOT}/apps/gramps/data/db:/root/.gramps/grampsdb
# - ${PROJECT_ROOT}/apps/gramps/data/media:/app/media
# - ${PROJECT_ROOT}/apps/gramps/data/tmp:/tmp
- ${DOCKER_VOLUMES}/gramps-data/users:/app/users
- ${DOCKER_VOLUMES}/gramps-data/index:/app/indexdir
- ${DOCKER_VOLUMES}/gramps-data/thumbnail_cache:/app/thumbnail_cache
- ${DOCKER_VOLUMES}/gramps-data/cache:/app/cache
- ${DOCKER_VOLUMES}/gramps-data/secret:/app/secret
- ${DOCKER_VOLUMES}/gramps-data/db:/root/.gramps/grampsdb
- ${DOCKER_VOLUMES}/gramps-data/media:/app/media
- ${DOCKER_VOLUMES}/gramps-data/tmp:/tmp
labels:
- "traefik.http.routers.gramps.rule=Host(`familytree.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.gramps.entrypoints=websecure"
- "traefik.http.routers.gramps.tls.certresolver=myresolver"
- "io.portainer.accesscontrol.public"
- "traefik.http.services.gramps.loadbalancer.server.port=5000"
- "traefik.docker.network=core_traefik"
- "wud.watch=true"
networks:
- traefik
- gramps
healthcheck:
test:
- CMD-SHELL
- wget -qO- http://127.0.0.1:5000/ >/dev/null
interval: 30s
timeout: 5s
retries: 6
start_period: 60s
grampsweb_celery:
profiles: ["apps","all","gramps"]
image: ghcr.io/gramps-project/grampsweb:latest
container_name: gramps-web-celery
command: celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2
depends_on:
- gramps-redis
restart: always
# env_file:
# - ${SECRETS_ENV_FILE}
environment:
TZ: ${TZ}
GRAMPSWEB_TREE: ${GRAMPSWEB_TREE}
GRAMPSWEB_BASE_URL: ${GRAMPSWEB_BASE_URL}
GRAMPSWEB_SECRET_KEY: ${GRAMPSWEB_SECRET_KEY}
GRAMPSWEB_REGISTRATION_DISABLED: ${GRAMPSWEB_REGISTRATION_DISABLED}
GRAMPSWEB_EMAIL_HOST: ${GRAMPSWEB_EMAIL_HOST}
GRAMPSWEB_EMAIL_PORT: ${GRAMPSWEB_EMAIL_PORT}
GRAMPSWEB_EMAIL_HOST_USER: ${GRAMPSWEB_EMAIL_HOST_USER}
GRAMPSWEB_EMAIL_HOST_PASSWORD: ${GRAMPSWEB_EMAIL_HOST_PASSWORD}
GRAMPSWEB_EMAIL_USE_SSL: ${GRAMPSWEB_EMAIL_USE_SSL}
GRAMPSWEB_EMAIL_USE_STARTTLS: ${GRAMPSWEB_EMAIL_USE_STARTTLS}
GRAMPSWEB_DEFAULT_FROM_EMAIL: ${GRAMPSWEB_DEFAULT_FROM_EMAIL}
GRAMPSWEB_CELERY_CONFIG__broker_url: redis://gramps-redis:6379/0
GRAMPSWEB_CELERY_CONFIG__result_backend: redis://gramps-redis:6379/0
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://gramps-redis:6379/1
volumes:
# - ${PROJECT_ROOT}/apps/gramps/data/users:/app/users
# - ${PROJECT_ROOT}/apps/gramps/data/index:/app/indexdir
# - ${PROJECT_ROOT}/apps/gramps/data/thumbnail_cache:/app/thumbnail_cache
# - ${PROJECT_ROOT}/apps/gramps/data/cache:/app/cache
# - ${PROJECT_ROOT}/apps/gramps/data/secret:/app/secret
# - ${PROJECT_ROOT}/apps/gramps/data/db:/root/.gramps/grampsdb
# - ${PROJECT_ROOT}/apps/gramps/data/media:/app/media
# - ${PROJECT_ROOT}/apps/gramps/data/tmp:/tmp
- ${DOCKER_VOLUMES}/gramps-data/users:/app/users
- ${DOCKER_VOLUMES}/gramps-data/index:/app/indexdir
- ${DOCKER_VOLUMES}/gramps-data/thumbnail_cache:/app/thumbnail_cache
- ${DOCKER_VOLUMES}/gramps-data/cache:/app/cache
- ${DOCKER_VOLUMES}/gramps-data/secret:/app/secret
- ${DOCKER_VOLUMES}/gramps-data/db:/root/.gramps/grampsdb
- ${DOCKER_VOLUMES}/gramps-data/media:/app/media
- ${DOCKER_VOLUMES}/gramps-data/tmp:/tmp
labels:
- "wud.watch=true"
networks:
- gramps
healthcheck:
test:
- CMD-SHELL
- pgrep -f "celery.*gramps_webapi.celery.*worker" >/dev/null
interval: 30s
timeout: 5s
retries: 6
start_period: 60s
gramps-redis:
profiles: ["apps","all","gramps"]
image: valkey/valkey:9-trixie
container_name: gramps-redis
restart: always
networks:
- gramps
healthcheck:
test:
- CMD-SHELL
- valkey-cli -h 127.0.0.1 -p 6379 ping | grep -q PONG
interval: 10s
timeout: 5s
retries: 6
start_period: 10s
labels:
- "wud.watch=true"
networks:
gramps:
+5
View File
@@ -0,0 +1,5 @@
FROM nextcloud:production
RUN apt-get update && \
apt-get install -y ffmpeg && \
rm -rf /var/lib/apt/lists/*
+158
View File
@@ -0,0 +1,158 @@
services:
nextcloud-webapp:
profiles: ["apps","all","nextcloud"]
image: nextcloud:production
build:
context: ${PROJECT_ROOT}/apps/nextcloud
container_name: nextcloud-webapp
restart: always
hostname: ${NEXTCLOUD_TRUSTED_DOMAINS}
# env_file:
# - ${SECRETS_ENV_FILE}
volumes:
# - ${PROJECT_ROOT}/apps/nextcloud/data:/var/www/html/data:rw
- ${NEXTCLOUD_DATA}:/var/www/html/data:rw
# - ${PROJECT_ROOT}/apps/nextcloud/config:/var/www/html/config:rw
- ${DOCKER_VOLUMES}/nextcloud/config:/var/www/html/config:rw
- type: tmpfs
target: /tmp:exec
# - ${PROJECT_ROOT}/apps/nextcloud/entrypoint.sh:/entrypoint.sh
# - ${PROJECT_ROOT}/apps/nextcloud/custom_apps:/var/www/html/custom_apps
- ${DOCKER_VOLUMES}/nextcloud/custom_apps:/var/www/html/custom_apps
depends_on:
- nextcloud-db
- nextcloud-redis
environment:
- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
- MYSQL_DATABASE=${NEXTCLOUD_MYSQL_DATABASE}
- MYSQL_USER=${NEXTCLOUD_DB_USER}
- MYSQL_HOST=${NEXTCLOUD_MYSQL_HOST}
- NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_TRUSTED_DOMAINS}
- OVERWRITEPROTOCOL=${NEXTCLOUD_OVERWRITEPROTOCOL}
- OVERWRITECLIURL=${NEXTCLOUD_OVERWRITECLIURL}
- SMTP_HOST=${NEXTCLOUD_SMTP_HOST}
- SMTP_SECURE=${NEXTCLOUD_SMTP_SECURE}
- SMTP_PORT=${NEXTCLOUD_SMTP_PORT}
- SMTP_AUTHTYPE=${NEXTCLOUD_SMTP_AUTHTYPE}
- MAIL_FROM_ADDRESS=${NEXTCLOUD_SMTP_FROM_ADDRESS}
- MAIL_DOMAIN=${NEXTCLOUD_SMTP_DOMAIN}
- SMTP_NAME=${NEXTCLOUD_SMTP_NAME}
- SMTP_PASSWORD_FILE=/run/secrets/nextcloud_smtp_password
- REDIS_HOST=${NEXTCLOUD_REDIS_HOST}
- REDIS_HOST_PORT=${NEXTCLOUD_REDIS_HOST_PORT}
# - REDIS_HOST_PASSWORD_FILE=/run/secrets/nextcloud_redis_password
secrets:
- nextcloud_db_password
- nextcloud_smtp_password
# - nextcloud_redis_password
networks:
- traefik
- nextcloud
labels:
- "traefik.http.routers.nextcloud.rule=Host(`${NEXTCLOUD_TRUSTED_DOMAINS}`)"
- "traefik.enable=true"
- "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.tls.certresolver=myresolver"
- "io.portainer.accesscontrol.public"
- "traefik.http.routers.nextcloud.middlewares=nextcloud-dav, nextcloud-webfinger"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.regex=^/.well-known/ca(l|rd)dav"
- "traefik.http.middlewares.nextcloud-dav.replacepathregex.replacement=/remote.php/dav/"
- "traefik.http.middlewares.nextcloud-nodeinfo.replacepathregex.regex=^/.well-known/nodeinfo"
- "traefik.http.middlewares.nextcloud-nodeinfo.replacepathregex.replacement=/nextcloud/index.php/.well-known/nodeinfo/"
- "traefik.http.middlewares.nextcloud-webfinger.redirectregex.permanent=true"
- "traefik.http.middlewares.nextcloud-webfinger.redirectregex.regex=https://(.*)/.well-known/webfinger"
- "traefik.http.middlewares.nextcloud-webfinger.redirectregex.replacement=https://$${1}/nextcloud/index.php/.well-known/webfinger"
- "traefik.docker.network=core_traefik"
- "wud.watch=true"
healthcheck:
test:
- CMD-SHELL
- >-
php -r '$$f=@fsockopen("127.0.0.1",80,$$e,$$s,2); if(!$$f) exit(1);
fwrite($$f,"GET /status.php HTTP/1.0\r\nHost: localhost\r\nConnection: close\r\n\r\n");
$$o=""; while(!feof($$f)){$$o.=fgets($$f,1024);} fclose($$f);
if(strpos($$o,"\"installed\":true")===false) exit(1);'
interval: 30s
timeout: 5s
retries: 6
start_period: 180s
nextcloud-db:
image: mariadb:${NEXTCLOUD_DB_VERSION}
restart: always
profiles: ["apps","all","nextcloud"]
container_name: nextcloud-db
hostname: nextcloud_db
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW --log_bin_trust_function_creators=true
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
volumes:
# - ${PROJECT_ROOT}/apps/nextcloud/database:/var/lib/mysql:rw
- ${DOCKER_DATABASES}/nextcloud/mysql:/var/lib/mysql:rw
environment:
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/nextcloud_db_root_password
- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
- MYSQL_DATABASE=${NEXTCLOUD_MYSQL_DATABASE}
- MYSQL_USER=${NEXTCLOUD_DB_USER}
- MARIADB_AUTO_UPGRADE=${NEXTCLOUD_MARIADB_AUTO_UPGRADE}
- NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER}
- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
secrets:
- nextcloud_db_root_password
- nextcloud_db_password
- nextcloud_admin_password
networks:
- nextcloud
labels:
- "io.portainer.accesscontrol.public"
- "wud.watch=true"
- 'wud.tag.include=^11\.4(?:\.\d+)?$'
# - "wud.tag.exclude=${NEXTCLOUD_DB_VERSION}-*"
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -u $$MYSQL_USER --password=$$(cat /run/secrets/nextcloud_db_password) --silent"]
interval: 10s
timeout: 5s
retries: 12
start_period: 60s
nextcloud-redis:
image: "redis"
profiles: ["apps","all","nextcloud"]
# command: ["sh", "-c", "redis-server --requirepass \"$$(cat /run/secrets/nextcloud_redis_password)\" --appendonly yes --save 60 1000"]
command: ["sh", "-c", "redis-server --appendonly yes --save 60 1000"]
hostname: redis
container_name: nextcloud-redis
# secrets:
# - nextcloud_redis_password
volumes:
# - ${PROJECT_ROOT}/apps/nextcloud/data/redis:/data:rw
- ${DOCKER_DATABASES}/nextcloud/redis:/data:rw
restart: always
networks:
- nextcloud
labels:
- "io.portainer.accesscontrol.public"
- "wud.watch=true"
healthcheck:
# test: ["CMD-SHELL", "redis-cli -a \"$$(cat /run/secrets/nextcloud_redis_password)\" PING | grep -q PONG"]
test: ["CMD-SHELL", "redis-cli PING | grep -q PONG"]
interval: 10s
timeout: 5s
retries: 6
start_period: 10s
networks:
nextcloud:
secrets:
nextcloud_db_root_password:
file: ${PROJECT_ROOT}/secrets/nextcloud_db_root_password.txt
nextcloud_db_password:
file: ${PROJECT_ROOT}/secrets/nextcloud_db_password.txt
nextcloud_admin_password:
file: ${PROJECT_ROOT}/secrets/nextcloud_admin_password.txt
nextcloud_smtp_password:
file: ${PROJECT_ROOT}/secrets/nextcloud_smtp_password.txt
# nextcloud_redis_password:
# file: ${PROJECT_ROOT}/secrets/nextcloud_redis_password.txt
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash
set -e
OCC="/var/www/html/occ"
php $OCC app:install memories || true
php $OCC app:enable memories || true
php $OCC app:install recognize || true
php $OCC app:enable recognize || true
exec apache2-foreground
File renamed without changes.
+88
View File
@@ -0,0 +1,88 @@
services:
passbolt-db:
profiles: ["apps","all","passbolt"]
container_name: passbolt-db
image: mariadb:latest
restart: always
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
environment:
MYSQL_RANDOM_ROOT_PASSWORD: ${PASSBOLT_MYSQL_RANDOM_ROOT_PASSWORD}
MYSQL_DATABASE: ${PASSBOLT_DB_NAME}
MYSQL_USER: ${PASSBOLT_DB_USER}
MYSQL_PASSWORD_FILE: /run/secrets/passbolt_db_password
secrets:
- passbolt_db_password
volumes:
# - ${PROJECT_ROOT}/apps/passbolt/data/database:/var/lib/mysql
- ${DOCKER_DATABASES}/passbolt:/var/lib/mysql
networks:
- passbolt
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h 127.0.0.1 -u\"$$MYSQL_USER\" -p\"$$(cat /run/secrets/passbolt_db_password)\" --silent"]
interval: 10s
timeout: 5s
retries: 12
start_period: 60s
labels:
- "io.portainer.accesscontrol.public"
- "wud.watch=true"
passbolt-webapp:
image: passbolt/passbolt:latest-ce
profiles: ["apps","all","passbolt"]
container_name: passbolt-webapp
restart: always
depends_on:
- passbolt-db
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
environment:
APP_FULL_BASE_URL: ${PASSBOLT_APP_FULL_BASE_URL}
DATASOURCES_DEFAULT_HOST: ${PASSBOLT_DATASOURCES_DEFAULT_HOST}
DATASOURCES_DEFAULT_USERNAME: ${PASSBOLT_DB_USER}
DATASOURCES_DEFAULT_PASSWORD_FILE: /run/secrets/passbolt_db_password
DATASOURCES_DEFAULT_DATABASE: ${PASSBOLT_DB_NAME}
PASSBOLT_GPG_SERVER_KEY_FINGERPRINT: ${PASSBOLT_GPG_SERVER_KEY_FINGERPRINT}
secrets:
- passbolt_db_password
volumes:
# - ${PROJECT_ROOT}/apps/passbolt/data/gpg:/etc/passbolt/gpg
# - ${PROJECT_ROOT}/apps/passbolt/data/jwt:/etc/passbolt/jwt
- ${DOCKER_VOLUMES}/passbolt-data/gpg:/etc/passbolt/gpg
- ${DOCKER_VOLUMES}/passbolt-data/jwt:/etc/passbolt/jwt
command:
[
"/usr/bin/wait-for.sh",
"-t",
"0",
"passbolt-db:3306",
"--",
"/docker-entrypoint.sh",
]
networks:
- traefik
- passbolt
labels:
- "traefik.http.routers.passbolt.rule=Host(`passbolt.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.passbolt.entrypoints=websecure"
- "traefik.http.routers.passbolt.tls.certresolver=myresolver"
- "io.portainer.accesscontrol.public"
- "traefik.docker.network=core_traefik"
- "wud.watch=true"
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost/healthcheck/status | grep -qx OK"]
interval: 30s
timeout: 10s
retries: 6
start_period: 120s
networks:
passbolt:
secrets:
passbolt_db_password:
file: ${PROJECT_ROOT}/secrets/passbolt_db_password.txt
File renamed without changes.
+33
View File
@@ -0,0 +1,33 @@
services:
searxng-webapp:
image: searxng/searxng
profiles: ["apps","all","searxng"]
container_name: searxng-webapp
restart: always
read_only: true
tmpfs:
- /tmp
- /var
- /run
hostname: searxng.lan.ddnsgeek.com
networks:
- traefik
labels:
- "traefik.http.routers.searxng.rule=Host(`searxng.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.searxng.entrypoints=websecure"
- "traefik.http.routers.searxng.tls.certresolver=myresolver"
- "io.portainer.accesscontrol.public"
# - "traefik.http.routers.searxng.middlewares=crowdsec@file,secHeaders@file,error-pages-middleware"
- "traefik.http.services.searxng.loadbalancer.server.port=8080"
- "wud.watch=true"
healthcheck:
test: ["CMD-SHELL", "python3 -c \"import urllib.request,sys; r=urllib.request.urlopen('http://127.0.0.1:8080/', timeout=3); sys.exit(0 if 200<=r.status<400 else 1)\""]
interval: 20s
timeout: 5s
retries: 8
start_period: 30s
#networks:
# traefik_reverse_proxy:
# external: true
@@ -0,0 +1,15 @@
FROM python:3.11-slim
#RUN groupadd -g 1000 appuser || true && \
# useradd -m -u 1000 -g 1000 -s /bin/bash appuser
#RUN groupadd -g 999 docker || true && usermod -aG docker appuser
WORKDIR /app
COPY exporter.py .
RUN mkdir -p /data
RUN pip install --no-cache-dir docker prometheus_client requests pyyaml
#USER appuser
CMD ["python", "-u", "exporter.py"]
@@ -0,0 +1,8 @@
FROM python:3.11-slim
WORKDIR /app
COPY exporter.py .
RUN pip install docker prometheus_client requests pyyaml
CMD ["python", "exporter.py"]
@@ -0,0 +1,24 @@
# Exporter image-mapping test example
Run the exporter in dry-run mode to print the `service -> image:tag` mapping without starting the metrics loop:
```bash
SERVICES_UP_SCRIPT=/workspace/docker/services-up.sh python monitoring/docker-exporter/exporter.py --dry-run
```
Example output excerpt:
```json
{
"crowdsec": "crowdsecurity/crowdsec:latest",
"docker-update-exporter": "python:3.11-slim",
"nextcloud-webapp": "nextcloud:production",
"node-red": "nodered/node-red:latest",
"prometheus": "prom/prometheus:latest",
"traefik": "traefik:3"
}
```
This confirms the exporter now reports images for both:
- services with explicit `image:` values, and
- services using `build:` contexts.
@@ -0,0 +1,59 @@
services:
docker-update-exporter:
profiles: ["monitoring","all","docker-exporter", "prometheus"]
build:
context: ${PROJECT_ROOT}/monitoring/docker-exporter
container_name: docker-update-exporter
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ${PROJECT_ROOT}/monitoring/docker-exporter/data:/data:rw
# - ${PROJECT_ROOT}/services-up.sh:/app/services-up.sh:ro
environment:
LOG_LEVEL: ${DOCKER_EXPORTER_LOG_LEVEL}
DOCKER_HOST: ${DOCKER_SOCKET_PROXY_HOST}
depends_on:
- docker-socket-proxy
volumes:
- ~/.docker/config.json:/root/.docker/config.json:ro
# - ${PROJECT_ROOT}/monitoring/docker-exporter/data:/data:rw
- ${DOCKER_VOLUMES}/docker-update-exporter-data:/data:rw
- ${PROJECT_ROOT}:/compose:ro
# - ${PROJECT_ROOT}/default-environment.env:/compose/default-environment.env:ro
# - ${PROJECT_ROOT}/default-network.yml:/compose/default-network.yml:ro
# - ${PROJECT_ROOT}/core/docker-compose.yml:/compose/core/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/prometheus/docker-compose.yml:/compose/monitoring/prometheus/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/gotify/docker-compose.yml:/compose/monitoring/gotify/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/grafana/docker-compose.yml:/compose/monitoring/grafana/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/portainer/docker-compose.yml:/compose/monitoring/portainer/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/uptime-kuma/docker-compose.yml:/compose/monitoring/uptime-kuma/docker-compose.yml:>
# - ${PROJECT_ROOT}/apps/gitea/docker-compose.yml:/compose/apps/gitea/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/gramps/docker-compose.yml:/compose/apps/gramps/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/nextcloud/docker-compose.yml:/compose/apps/nextcloud/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/passbolt/docker-compose.yml:/compose/apps/passbolt/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/searxng/docker-compose.yml:/compose/apps/searxng/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/shift-recorder/docker-compose.yml:/compose/apps/shift-recorder/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/stockfill/docker-compose.yml:/compose/apps/stockfill/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/node-red/docker-compose.yml:/compose/monitoring/node-red/docker-compose.yml:ro
# - ${PROJECT_ROOT}/core/test/docker-compose.yml:/compose/core/test/docker-compose.yml:ro
# ports:
# - "9105:9105"
restart: unless-stopped
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
networks:
# - edge
- monitor
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9105/metrics')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
#volumes:
# docker-update-exporter-data:
# external: true
@@ -0,0 +1,579 @@
#!/usr/bin/env python3
import argparse
import os
import re
import time
import json
import logging
import docker
import yaml
from prometheus_client import Gauge, start_http_server
# --- Logging ---
LOG_LEVEL = os.getenv("LOG_LEVEL", "DEBUG").upper()
logging.basicConfig(
level=getattr(logging, LOG_LEVEL, logging.DEBUG),
format="%(asctime)s [%(levelname)s] %(message)s"
)
logger = logging.getLogger("docker-update-exporter")
# --- Config ---
EXPORTER_PORT = 9105
CHECK_INTERVAL = 3600
CACHE_TTL = int(os.getenv("CACHE_TTL", "300"))
SERVICES_UP_SCRIPT = os.getenv("SERVICES_UP_SCRIPT", "/compose/services-up.sh")
CACHE_FILE = os.getenv("CACHE_FILE", "/data/remote_digest_cache.json")
DRY_RUN = os.getenv("DRY_RUN", "false").lower() in ("1", "true", "yes")
try:
client = docker.from_env()
except Exception as e:
logger.warning(f"Docker client unavailable at startup: {e}")
client = None
# --- Metrics ---
CONTAINER_UPDATE = Gauge(
"docker_container_update_available",
"1 if container image is out of date (compose drift or registry), 0 otherwise",
["container", "compose_image", "running_image", "com_docker_compose_project"]
)
LAST_CHECK = Gauge(
"docker_image_update_last_check_timestamp",
"Last time the update check ran (unix timestamp)"
)
def set_container_update_metric(container_name, compose_image, running_image, project_name, update_flag):
"""Set update metric for a container and log the emitted metric payload."""
metric_labels = {
"container": container_name,
"compose_image": compose_image or "unknown",
"running_image": running_image,
"com_docker_compose_project": project_name,
}
CONTAINER_UPDATE.labels(**metric_labels).set(update_flag)
logger.info(
"Metric emitted: docker_container_update_available=%s labels=%s",
update_flag,
metric_labels,
)
def set_last_check_metric():
"""Set and log the timestamp for the most recent check cycle."""
ts = time.time()
LAST_CHECK.set(ts)
logger.info("Metric emitted: docker_image_update_last_check_timestamp=%s", ts)
# --- Persistent Cache ---
def load_cache():
if not os.path.exists(CACHE_FILE):
logger.info(f"Cache file does not exist yet: {CACHE_FILE}")
return {}
try:
with open(CACHE_FILE, "r") as f:
cache = json.load(f)
logger.info(f"Loaded {len(cache)} cached remote digests")
return cache
except Exception as e:
logger.error(f"Failed to load cache: {e}")
return {}
def save_cache():
try:
os.makedirs(os.path.dirname(CACHE_FILE), exist_ok=True)
with open(CACHE_FILE, "w") as f:
json.dump(REMOTE_DIGEST_CACHE, f)
logger.debug(f"Saved {len(REMOTE_DIGEST_CACHE)} remote digests to cache")
except Exception as e:
logger.error(f"Failed to save cache: {e}")
REMOTE_DIGEST_CACHE = load_cache()
now = time.time()
REMOTE_DIGEST_CACHE = {
image: (digest, ts)
for image, (digest, ts) in REMOTE_DIGEST_CACHE.items()
if now - ts < CACHE_TTL
}
# --- Helpers ---
def get_project_prefix_from_script(script_path):
prefix = "core-"
if not os.path.exists(script_path):
return prefix
try:
with open(script_path) as f:
for line in f:
m = re.match(r'PROJECT\s*=\s*["\']?([^"\']+)', line)
if m:
return m.group(1) + "-"
except Exception as e:
logger.warning(f"Failed reading project prefix: {e}")
return prefix
def get_local_digest(image_name):
"""
Return the local digest for the specific image reference.
"""
if client is None:
return None
try:
img = client.images.get(image_name)
digests = img.attrs.get("RepoDigests", [])
logger.debug(f"RepoDigests for {image_name}: {digests}")
for entry in digests:
if "@" in entry:
digest = entry.split("@", 1)[1]
logger.debug(f"Local digest for {image_name}: {digest}")
return digest
logger.debug(f"No RepoDigest found for {image_name}")
except Exception as e:
logger.debug(f"Could not get local digest for {image_name}: {e}")
return None
def get_remote_digest(image_name):
"""
Return the upstream digest for the exact platform-specific image that Docker
would pull on this host. This avoids false positives with multi-arch images
where the registry manifest-list digest differs from the pulled image digest.
"""
now = time.time()
cached = REMOTE_DIGEST_CACHE.get(image_name)
if cached:
digest, ts = cached
if now - ts < CACHE_TTL:
logger.debug(f"Using cached remote digest for {image_name}: {digest}")
return digest
if client is None:
return None
try:
registry_data = client.images.get_registry_data(image_name)
digest = None
# docker SDK versions differ; try the common fields in order
if hasattr(registry_data, "id") and registry_data.id:
digest = registry_data.id
elif hasattr(registry_data, "attrs"):
digest = (
registry_data.attrs.get("Descriptor", {}).get("digest")
or registry_data.attrs.get("digest")
)
if digest:
REMOTE_DIGEST_CACHE[image_name] = (digest, now)
save_cache()
logger.debug(f"Remote digest for {image_name}: {digest}")
return digest
logger.warning(f"No remote digest found for {image_name}")
return None
except Exception as e:
logger.debug(f"Error fetching remote digest for {image_name}: {e}")
return None
# --- Dockerfile Image Extraction ---
def parse_dockerfile_for_image(dockerfile_path):
if not os.path.exists(dockerfile_path):
return None
try:
arg_defaults = {}
last_from = None
with open(dockerfile_path) as df:
for line in df:
line = line.strip()
if not line or line.startswith("#"):
continue
if line.upper().startswith("ARG "):
arg_body = line[4:].strip()
if "=" in arg_body:
key, value = arg_body.split("=", 1)
arg_defaults[key.strip()] = value.strip()
continue
# Prefer LABEL with image if present.
if "LABEL" in line and "image=" in line:
match = re.search(r'image=["\']?([^"\']+)["\']?', line)
if match:
image_name = normalize_image_name(substitute_dockerfile_args(match.group(1), arg_defaults))
logger.debug(f"Found LABEL image={image_name} in {dockerfile_path}")
return image_name
if line.upper().startswith("FROM "):
from_clause = line[5:].strip()
if from_clause.startswith("--"):
split_clause = from_clause.split(None, 1)
if len(split_clause) < 2:
continue
from_clause = split_clause[1]
parts = from_clause.split()
if not parts:
continue
candidate = substitute_dockerfile_args(parts[0], arg_defaults)
if candidate and candidate.lower() != "scratch":
last_from = normalize_image_name(candidate)
if last_from:
logger.debug(f"Found base FROM {last_from} in {dockerfile_path}")
return last_from
except Exception as e:
logger.debug(f"Error reading Dockerfile {dockerfile_path}: {e}")
return None
def normalize_image_name(image_name):
if not image_name:
return None
if "@" in image_name:
return image_name
if ":" in image_name.rsplit("/", 1)[-1]:
return image_name
return f"{image_name}:latest"
def is_compose_build_placeholder(image_name, project_name):
if not image_name:
return False
candidate = str(image_name)
project_prefix = f"{project_name}-"
if candidate.startswith(project_prefix):
return True
# Keep backward-compatible behavior for historical default project prefix.
return candidate.startswith("core-")
def substitute_dockerfile_args(value, arg_defaults):
if not value:
return value
pattern = re.compile(r"\$\{([^}]+)\}|\$([A-Za-z_][A-Za-z0-9_]*)")
def replacer(match):
expr = match.group(1)
simple = match.group(2)
if simple:
return arg_defaults.get(simple, "")
if ":-" in expr:
var_name, default_value = expr.split(":-", 1)
return arg_defaults.get(var_name, default_value)
if "-" in expr:
var_name, default_value = expr.split("-", 1)
return arg_defaults.get(var_name, default_value)
return arg_defaults.get(expr, "")
return pattern.sub(replacer, value)
def expand_compose_path(path_value, project_root):
raw = str(path_value)
raw = raw.replace("${PROJECT_ROOT}", project_root).replace("$PROJECT_ROOT", project_root)
return os.path.expandvars(raw)
def get_project_root_from_script(script_path):
if not script_path:
return os.getcwd()
return os.path.dirname(os.path.abspath(script_path))
# --- Compose parsing ---
def get_compose_files_from_script(script_path):
files = []
if not os.path.exists(script_path):
return files
base_dir = get_project_root_from_script(script_path)
def _clean_compose_path(raw_path):
cleaned = str(raw_path).strip().strip(",")
if (cleaned.startswith('"') and cleaned.endswith('"')) or (
cleaned.startswith("'") and cleaned.endswith("'")
):
cleaned = cleaned[1:-1]
expanded = expand_compose_path(cleaned, base_dir)
if os.path.isabs(expanded):
return os.path.normpath(expanded)
return os.path.normpath(os.path.join(base_dir, expanded))
try:
with open(script_path) as f:
content = f.read()
match = re.search(r'FILES\s*=\s*\((.*?)\)', content, re.DOTALL)
if match:
for line in match.group(1).splitlines():
line = line.strip()
if line.startswith("-f"):
path = line[2:].strip()
if path:
full = _clean_compose_path(path)
files.append(full)
# services-up.sh can append many compose files at runtime via:
# FILES+=(-f "$file") done < <(find "$PROJECT_ROOT/apps" ...)
# Mirror that behavior here so we can map service->compose image.
root_dirs = []
find_match = re.search(r'find\s+(.*?)\s+\\\s*\n', content)
if find_match:
for token in re.findall(r'"([^"]+)"|\'([^\']+)\'', find_match.group(1)):
candidate = token[0] or token[1]
if candidate:
root_dirs.append(_clean_compose_path(candidate))
else:
root_dirs = [
os.path.join(base_dir, "apps"),
os.path.join(base_dir, "monitoring"),
os.path.join(base_dir, "core"),
]
for root_dir in root_dirs:
if not os.path.isdir(root_dir):
continue
for candidate in sorted(os.listdir(root_dir)):
svc_dir = os.path.join(root_dir, candidate)
if not os.path.isdir(svc_dir):
continue
for compose_name in ("docker-compose.yml", "docker-compose.yaml"):
compose_path = os.path.join(svc_dir, compose_name)
if os.path.exists(compose_path):
files.append(compose_path)
# Preserve order while removing duplicates.
deduped = []
seen = set()
for path in files:
if path in seen:
continue
seen.add(path)
deduped.append(path)
files = deduped
except Exception as e:
logger.warning(f"Failed parsing services-up.sh: {e}")
return files
def parse_project_name_from_script(script_path):
project = "core"
if not os.path.exists(script_path):
return project
try:
with open(script_path) as f:
for line in f:
m = re.match(r'PROJECT\s*=\s*["\']?([^"\']+)', line)
if m:
project = m.group(1)
break
except Exception as e:
logger.warning(f"Failed reading project name: {e}")
return project
def resolve_local_build_image(service_name, project_name):
if client is None:
return None
try:
images = client.images.list(filters={"label": f"com.docker.compose.service={service_name}"})
for image in images:
labels = image.attrs.get("Config", {}).get("Labels", {}) or {}
if labels.get("com.docker.compose.project") != project_name:
continue
for tag in image.tags:
if tag and "<none>" not in tag:
logger.debug(f"Resolved local compose image for {service_name}: {tag}")
return normalize_image_name(tag)
except Exception as e:
logger.debug(f"Could not inspect local build metadata for {service_name}: {e}")
return None
def parse_compose_services(compose_files, project_name, project_root):
svc_map = {}
for f in compose_files:
if not os.path.exists(f):
logger.warning(f"Compose file from services-up.sh is missing: {f}")
continue
try:
with open(f) as stream:
data = yaml.safe_load(stream) or {}
for svc_name, svc_def in data.get("services", {}).items():
image = normalize_image_name(svc_def.get("image"))
profiles = svc_def.get("profiles", [])
build_ctx = svc_def.get("build")
dockerfile_path = None
from_dockerfile = None
local_built_image = None
if build_ctx:
if isinstance(build_ctx, dict):
context = build_ctx.get("context", ".")
dockerfile = build_ctx.get("dockerfile", "Dockerfile")
else:
context = build_ctx
dockerfile = "Dockerfile"
compose_dir = os.path.dirname(f)
context_expanded = expand_compose_path(context, project_root)
if os.path.isabs(context_expanded):
context_path = context_expanded
else:
context_path = os.path.normpath(os.path.join(compose_dir, context_expanded))
dockerfile_expanded = expand_compose_path(dockerfile, project_root)
dockerfile_path = os.path.normpath(os.path.join(context_path, dockerfile_expanded))
from_dockerfile = normalize_image_name(parse_dockerfile_for_image(dockerfile_path))
local_built_image = resolve_local_build_image(svc_name, project_name)
placeholder_image = is_compose_build_placeholder(image, project_name) or is_compose_build_placeholder(local_built_image, project_name)
if placeholder_image:
resolved_image = from_dockerfile or image or local_built_image or f"{project_name}-{svc_name}:latest"
else:
resolved_image = image or local_built_image or from_dockerfile or f"{project_name}-{svc_name}:latest"
svc_map[svc_name] = {
"image": resolved_image,
"profiles": profiles,
"build_context": build_ctx,
"compose_file": f,
"dockerfile": dockerfile_path
}
except Exception as e:
logger.warning(f"Failed parsing {f}: {e}")
logger.debug(f"Service image mapping: {svc_map}")
return svc_map
# --- Main check ---
def check_containers():
if client is None:
logger.error("Docker client is unavailable; skipping check cycle")
return
set_last_check_metric()
CONTAINER_UPDATE.clear()
project_name = parse_project_name_from_script(SERVICES_UP_SCRIPT)
project_root = get_project_root_from_script(SERVICES_UP_SCRIPT)
compose_files = get_compose_files_from_script(SERVICES_UP_SCRIPT)
svc_map = parse_compose_services(compose_files, project_name, project_root)
containers = client.containers.list()
pending_metrics = []
remote_targets = set()
for container in containers:
proj = container.labels.get("com.docker.compose.project")
if not proj:
continue
svc = container.labels.get("com.docker.compose.service")
running = container.attrs["Config"]["Image"]
compose_image = None
if svc in svc_map:
compose_image = svc_map[svc]["image"]
local_digest = get_local_digest(running)
remote_target = compose_image or running
# If we cannot determine a local digest, we cannot compare and should
# avoid spending a registry lookup for this container.
if local_digest:
remote_targets.add(remote_target)
pending_metrics.append({
"container_name": container.name,
"service": svc,
"compose_image": compose_image,
"running_image": running,
"project_name": proj,
"remote_target": remote_target,
"local_digest": local_digest,
})
remote_digests = {target: get_remote_digest(target) for target in remote_targets}
for payload in pending_metrics:
local_digest = payload["local_digest"]
remote_target = payload["remote_target"]
remote_digest = remote_digests.get(remote_target)
update_flag = 1 if (local_digest and remote_digest and local_digest != remote_digest) else 0
logger.info(
"Digest comparison: container=%s service=%s running=%s target=%s local=%s remote=%s",
payload["container_name"],
payload["service"],
payload["running_image"],
remote_target,
local_digest,
remote_digest,
)
set_container_update_metric(
container_name=payload["container_name"],
compose_image=payload["compose_image"],
running_image=payload["running_image"],
project_name=payload["project_name"],
update_flag=update_flag,
)
def dump_service_image_mapping():
project_name = parse_project_name_from_script(SERVICES_UP_SCRIPT)
project_root = get_project_root_from_script(SERVICES_UP_SCRIPT)
compose_files = get_compose_files_from_script(SERVICES_UP_SCRIPT)
svc_map = parse_compose_services(compose_files, project_name, project_root)
mapping = {name: data["image"] for name, data in sorted(svc_map.items())}
logger.info("Service to image mapping:")
logger.info(json.dumps(mapping, indent=2, sort_keys=True))
return mapping
# --- Runner ---
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Docker image update exporter")
parser.add_argument("--dry-run", action="store_true", help="Only print service->image mapping and exit")
parser.add_argument(
"--services-up-script",
default=SERVICES_UP_SCRIPT,
help=f"Path to services-up script (default: {SERVICES_UP_SCRIPT})",
)
parser.add_argument(
"--cache-file",
default=CACHE_FILE,
help=f"Path to digest cache file (default: {CACHE_FILE})",
)
parser.add_argument(
"--log-level",
default=LOG_LEVEL,
help=f"Logging level (default: {LOG_LEVEL})",
)
args = parser.parse_args()
effective_log_level = str(args.log_level).upper()
logging.getLogger().setLevel(getattr(logging, effective_log_level, logging.DEBUG))
logger.setLevel(getattr(logging, effective_log_level, logging.DEBUG))
SERVICES_UP_SCRIPT = args.services_up_script
CACHE_FILE = args.cache_file
REMOTE_DIGEST_CACHE = load_cache()
now = time.time()
REMOTE_DIGEST_CACHE = {
image: (digest, ts)
for image, (digest, ts) in REMOTE_DIGEST_CACHE.items()
if now - ts < CACHE_TTL
}
if DRY_RUN or args.dry_run:
dump_service_image_mapping()
raise SystemExit(0)
start_http_server(EXPORTER_PORT)
while True:
try:
check_containers()
except Exception as e:
logger.exception(f"update check failed: {e}")
time.sleep(CHECK_INTERVAL)
@@ -0,0 +1,514 @@
#!/usr/bin/env python3
import os
import re
import time
import json
import logging
import docker
import requests
import yaml
from prometheus_client import Gauge, start_http_server
# --- Logging ---
LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO").upper()
logging.basicConfig(
level=getattr(logging, LOG_LEVEL, logging.INFO),
format="%(asctime)s [%(levelname)s] %(message)s"
)
logger = logging.getLogger("docker-update-exporter")
# --- Config ---
EXPORTER_PORT = 9105
CHECK_INTERVAL = 60
CACHE_TTL = 6 * 3600
SERVICES_UP_SCRIPT = "/compose/services-up.sh"
CACHE_FILE = "/data/remote_digest_cache.json"
client = docker.from_env()
# --- Metrics ---
CONTAINER_UPDATE = Gauge(
"docker_container_update_available",
"1 if container image is out of date (compose drift or registry), 0 otherwise",
["container", "compose_image", "running_image", "com_docker_compose_project"]
)
LAST_CHECK = Gauge(
"docker_image_update_last_check_timestamp",
"Last time the update check ran (unix timestamp)"
)
# --- Persistent Cache ---
def load_cache():
if not os.path.exists(CACHE_FILE):
logger.info(f"Cache file does not exist yet: {CACHE_FILE}")
return {}
try:
with open(CACHE_FILE, "r") as f:
cache = json.load(f)
logger.info(f"Loaded {len(cache)} cached remote digests")
logger.debug(f"Cache contents: {cache}")
return cache
except Exception as e:
logger.error(f"Failed to load cache from {CACHE_FILE}: {e}")
return {}
def save_cache():
try:
os.makedirs(os.path.dirname(CACHE_FILE), exist_ok=True)
with open(CACHE_FILE, "w") as f:
json.dump(REMOTE_DIGEST_CACHE, f)
logger.debug(
f"Saved {len(REMOTE_DIGEST_CACHE)} entries to cache file {CACHE_FILE}"
)
except Exception as e:
logger.error(f"Failed to save cache to {CACHE_FILE}: {e}")
REMOTE_DIGEST_CACHE = load_cache()
# --- Helpers ---
def get_project_prefix_from_script(script_path):
project_prefix = "core-" # fallback
if not os.path.exists(script_path):
logger.warning(
f"services-up script not found at {script_path}, using fallback project prefix {project_prefix}"
)
return project_prefix
try:
with open(script_path, "r") as f:
for line in f:
line = line.strip()
m = re.match(r'PROJECT\s*=\s*["\']?([^"\']+)["\']?', line)
if m:
project_prefix = m.group(1) + "-"
logger.debug(
f"Detected compose project prefix from script: {project_prefix}"
)
break
except Exception as e:
logger.error(f"Failed reading project prefix from {script_path}: {e}")
return project_prefix
def get_local_digest(image_name):
try:
img = client.images.get(image_name)
digests = img.attrs.get("RepoDigests", [])
logger.debug(f"Local RepoDigests for {image_name}: {digests}")
if digests:
digest = digests[0].split("@")[1]
logger.debug(f"Local digest for {image_name}: {digest}")
return digest
logger.info(f"No local digest found for image {image_name}")
except Exception as e:
logger.warning(f"Failed to retrieve local digest for {image_name}: {e}")
return None
def get_remote_digest(image_name):
now = time.time()
original = image_name
# Cache hit
if original in REMOTE_DIGEST_CACHE:
digest, ts = REMOTE_DIGEST_CACHE[original]
age = now - ts
if age < CACHE_TTL:
logger.debug(
f"Using cached remote digest for {original} "
f"(age={int(age)}s, ttl={CACHE_TTL}s): {digest}"
)
return digest
logger.info(
f"Cache entry expired for {original} "
f"(age={int(age)}s > ttl={CACHE_TTL}s)"
)
try:
if "/" not in image_name:
registry = "docker.io"
repo = "library/" + image_name
else:
parts = image_name.split("/")
if "." in parts[0] or ":" in parts[0]:
registry = parts[0]
repo = "/".join(parts[1:])
else:
registry = "docker.io"
repo = image_name
if ":" in repo:
repo, tag = repo.rsplit(":", 1)
else:
tag = "latest"
logger.debug(
f"Resolving remote digest for {original}: "
f"registry={registry}, repo={repo}, tag={tag}"
)
token = None
manifest_url = None
if registry in ["docker.io", "registry-1.docker.io"]:
logger.debug(f"Requesting Docker Hub token for {repo}")
token_res = requests.get(
"https://auth.docker.io/token",
params={
"service": "registry.docker.io",
"scope": f"repository:{repo}:pull"
},
timeout=10
)
logger.debug(
f"Docker Hub token response for {repo}: "
f"status={token_res.status_code}"
)
token = token_res.json().get("token")
manifest_url = (
f"https://registry-1.docker.io/v2/{repo}/manifests/{tag}"
)
elif registry == "ghcr.io":
logger.debug(f"Requesting GHCR token for {repo}")
token_res = requests.get(
"https://ghcr.io/token",
params={
"service": "ghcr.io",
"scope": f"repository:{repo}:pull"
},
timeout=10
)
logger.debug(
f"GHCR token response for {repo}: "
f"status={token_res.status_code}"
)
token = token_res.json().get("token")
manifest_url = f"https://ghcr.io/v2/{repo}/manifests/{tag}"
else:
logger.warning(
f"Unsupported registry '{registry}' for image {original}"
)
return None
if not token:
logger.warning(
f"No authentication token returned for {original}"
)
return None
logger.debug(f"Requesting manifest for {original}: {manifest_url}")
res = requests.get(
manifest_url,
headers={
"Authorization": f"Bearer {token}",
"Accept": "application/vnd.docker.distribution.manifest.v2+json"
},
timeout=10
)
logger.debug(
f"Manifest response for {original}: "
f"status={res.status_code}"
)
if res.status_code == 200:
digest = res.headers.get("Docker-Content-Digest")
logger.info(
f"Fetched remote digest for {original}: {digest}"
)
REMOTE_DIGEST_CACHE[original] = (digest, now)
save_cache()
logger.debug(
f"Cached remote digest for {original}: {digest}"
)
return digest
if res.status_code == 429:
logger.warning(
f"Registry rate limit hit while fetching {original}"
)
elif res.status_code in [401, 403]:
logger.warning(
f"Authentication failed while fetching {original}: "
f"status={res.status_code}"
)
else:
logger.warning(
f"Unexpected manifest response for {original}: "
f"status={res.status_code}, body={res.text[:250]}"
)
except Exception as e:
logger.error(f"Failed to fetch remote digest for {original}: {e}")
return None
def get_compose_files_from_script(script_path):
files = []
if not os.path.exists(script_path):
logger.error(f"services-up script not found: {script_path}")
return files
base_dir = os.path.dirname(script_path)
try:
with open(script_path, "r") as f:
content = f.read()
match = re.search(r'FILES\s*=\s*\((.*?)\)', content, re.DOTALL)
if not match:
logger.warning(
f"No FILES=(...) block found in {script_path}"
)
return files
lines = match.group(1).splitlines()
for line in lines:
line = line.strip()
if line.startswith("-f"):
rel_path = line[2:].strip()
if rel_path:
full_path = os.path.normpath(
os.path.join(base_dir, rel_path)
)
logger.debug(
f"Resolved compose file: {rel_path} -> {full_path}"
)
files.append(full_path)
logger.info(f"Found {len(files)} compose files")
except Exception as e:
logger.error(f"Failed parsing compose files from {script_path}: {e}")
return files
def parse_compose_files(compose_files):
service_to_image = {}
for f in compose_files:
if not os.path.exists(f):
logger.warning(f"Compose file missing: {f}")
continue
try:
with open(f, "r") as stream:
data = yaml.safe_load(stream) or {}
services = data.get("services", {})
logger.debug(
f"Parsing {len(services)} services from compose file {f}"
)
for service_name, service_def in services.items():
image = service_def.get("image")
is_built = False
if not image:
is_built = True
build_ctx = service_def.get("build")
logger.debug(
f"Service {service_name} is build-based, build config={build_ctx}"
)
if isinstance(build_ctx, dict):
context_path = build_ctx.get("context", ".")
dockerfile_path = os.path.join(
context_path,
build_ctx.get("dockerfile", "Dockerfile")
)
elif isinstance(build_ctx, str):
context_path = build_ctx
dockerfile_path = os.path.join(
context_path, "Dockerfile"
)
else:
dockerfile_path = None
if dockerfile_path and os.path.exists(dockerfile_path):
try:
with open(dockerfile_path, "r") as df:
for line in df:
line = line.strip()
if (
line.upper().startswith("LABEL")
and "image=" in line
):
m = re.search(
r'image=["\']?([^"\']+)["\']?',
line
)
if m:
image = m.group(1)
logger.debug(
f"Found upstream image label for {service_name}: {image}"
)
break
except Exception as e:
logger.warning(
f"Failed reading Dockerfile {dockerfile_path}: {e}"
)
if not image:
image = f"{service_name}:latest"
logger.info(
f"No image label found for build service {service_name}, "
f"defaulting to {image}"
)
service_to_image[service_name] = (image, is_built)
except Exception as e:
logger.error(f"Failed parsing compose file {f}: {e}")
logger.info(f"Mapped {len(service_to_image)} compose services to images")
logger.debug(f"Service/image mapping: {service_to_image}")
return service_to_image
def check_containers():
logger.info("Starting container update check")
CONTAINER_UPDATE.clear()
project_prefix = get_project_prefix_from_script(SERVICES_UP_SCRIPT)
compose_files = get_compose_files_from_script(SERVICES_UP_SCRIPT)
service_to_image = parse_compose_files(compose_files)
containers = client.containers.list()
logger.info(f"Checking {len(containers)} running containers")
for container in containers:
project_label = container.labels.get("com.docker.compose.project")
if not project_label:
logger.debug(
f"Skipping non-compose container {container.name}"
)
continue
service_label = container.labels.get("com.docker.compose.service")
running_image = container.attrs["Config"]["Image"]
logger.debug(
f"Evaluating container={container.name}, "
f"service={service_label}, project={project_label}, "
f"running_image={running_image}"
)
compose_image = None
is_built = False
if service_label and service_label in service_to_image:
compose_image, is_built = service_to_image[service_label]
if is_built:
compose_image_name, _, _ = compose_image.partition(":")
compose_image = f"{project_prefix}{compose_image_name}"
update_flag = 0
if is_built:
if running_image != compose_image:
logger.info(
f"Update detected for build-based container {container.name}: "
f"running image {running_image} != expected {compose_image}"
)
update_flag = 1
else:
local_digest = get_local_digest(running_image)
remote_digest = get_remote_digest(
service_to_image[service_label][0]
)
if local_digest and remote_digest and local_digest != remote_digest:
logger.info(
f"Remote image update available for {container.name}: "
f"{local_digest} != {remote_digest}"
)
update_flag = 1
else:
if running_image != compose_image:
logger.info(
f"Compose drift detected for {container.name}: "
f"running image {running_image} != compose image {compose_image}"
)
update_flag = 1
else:
local_digest = get_local_digest(running_image)
remote_digest = get_remote_digest(running_image)
if local_digest and remote_digest and local_digest != remote_digest:
logger.info(
f"Registry update available for {container.name}: "
f"{local_digest} != {remote_digest}"
)
update_flag = 1
CONTAINER_UPDATE.labels(
container=container.name,
compose_image=compose_image if compose_image else "unknown",
running_image=running_image,
com_docker_compose_project=project_label
).set(update_flag)
logger.info(
f"Container {container.name}: "
f"running={running_image}, "
f"compose={compose_image}, "
f"update_available={update_flag}"
)
LAST_CHECK.set(time.time())
logger.info("Container update check complete")
if __name__ == "__main__":
logger.info(
f"Starting Docker update exporter on port {EXPORTER_PORT} "
f"with LOG_LEVEL={LOG_LEVEL}"
)
start_http_server(EXPORTER_PORT)
while True:
try:
check_containers()
except Exception as e:
logger.exception(f"Unhandled error during update check: {e}")
time.sleep(CHECK_INTERVAL)
@@ -0,0 +1,55 @@
services:
grafana:
profiles: ["monitoring","all","grafana"]
image: grafana/grafana:latest
container_name: grafana
restart: unless-stopped
environment:
- GF_SERVER_ROOT_URL=${GRAFANA_ROOT_URL}
volumes:
# - ${PROJECT_ROOT}/monitoring/grafana/data:/var/lib/grafana
- ${DOCKER_VOLUMES}/grafana-data:/var/lib/grafana
networks:
# - traefik_reverse_proxy
# - prometheus_edge
- traefik
- monitor
labels:
- "traefik.http.routers.grafana.rule=Host(`grafana.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.grafana.entrypoints=websecure"
- "traefik.http.routers.grafana.tls.certresolver=myresolver"
- "traefik.http.routers.grafana.tls.options=mtls-private-admin@file"
- "io.portainer.accesscontrol.public"
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
- "traefik.docker.network=core_traefik"
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
# tempo:
# image: grafana/tempo:latest
# container_name: tempo
# command:
# - "-config.file=/etc/tempo/config.yaml"
# volumes:
# - ./tempo/config.yaml:/etc/tempo/config.yaml
# - ./tempo/data:/var/lib/tempo
# ports:
# - "4317:4317" # OTLP gRPC endpoint for Traefik
# - "3200:3200" # optional: HTTP endpoint
# networks:
# - prometheus_edge
#networks:
# traefik_reverse_proxy:
# external: true
# prometheus_edge:
# external: true
#volumes:
# grafana-data:
# external: true
@@ -0,0 +1,50 @@
services:
influxdb:
profiles: ["monitoring","all","influxdb", "prometheus"]
image: influxdb:2
container_name: influxdb
restart: unless-stopped
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
volumes:
# - ${PROJECT_ROOT}/monitoring/influxdb:/var/lib/influxdb2
- ${DOCKER_DATABASES}/influxdb-data:/var/lib/influxdb2
environment:
DOCKER_INFLUXDB_INIT_MODE: ${INFLUXDB_INIT_MODE}
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_INIT_USERNAME}
DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influxdb_init_password
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_INIT_ORG}
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_INIT_BUCKET}
secrets:
- influxdb_init_password
networks:
# - edge
# - traefik_reverse_proxy
- traefik
- monitor
ports:
- 8086:8086
labels:
- "traefik.http.routers.influxdb.rule=Host(`influxdb.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.influxdb.entrypoints=websecure"
- "traefik.http.routers.influxdb.tls.certresolver=myresolver"
- "traefik.http.routers.influxdb.tls.options=mtls-private-admin@file"
- "io.portainer.accesscontrol.public"
- "traefik.http.services.influxdb.loadbalancer.server.port=8086"
- "traefik.http.routers.influxdb.middlewares=authelia"
- "traefik.docker.network=core_traefik"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8086/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
secrets:
influxdb_init_password:
file: ${PROJECT_ROOT}/secrets/influxdb_init_password.txt
#volumes:
# influxdb-data:
# external: true
@@ -0,0 +1,12 @@
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
EXPOSE 8080
CMD ["python", "app.py"]
@@ -0,0 +1,60 @@
# mTLS Bridge Service
Internal HTTP-to-mTLS bridge for services that cannot present client certificates directly (for example, Grafana webhooks).
## How it works
1. Accepts plain HTTP requests inside the Docker network.
2. Forwards requests to an upstream base URL.
3. Preserves the incoming request path/method/body/query string.
4. Presents a client certificate/key pair for mTLS authentication.
## Environment variables
- `TARGET_URL` (required): upstream base URL (for example `http://node-red:1880`).
- `CLIENT_CERT` (default `/certs/client.crt`): client certificate path.
- `CLIENT_KEY` (default `/certs/client.key`): client private key path.
- `UPSTREAM_CA_CERT` (optional, alias: `CA_CERT`): CA bundle path to verify upstream TLS. Use `false`/`0`/`no` to disable verification.
- `TIMEOUT` (default `5`): request timeout in seconds.
- `LOG_LEVEL` (default `INFO`): Python logging level.
- `HEALTH_ENDPOINT` (default `/_mtls_bridge/health`): local container health endpoint path.
- `ALLOWED_PATHS_FILE` (optional): file path containing one allowed endpoint path per line (for example `/health`). Blank lines and `#` comments are ignored. If unset, all paths are allowed.
- `MTLS_BRIDGE_BASIC_AUTH_USERS` (required for Traefik auth): value for `traefik.http.middlewares.*.basicauth.users` (e.g. `user:$$apr1$$...`).
- `MTLS_BRIDGE_CORS_ALLOW_ORIGIN` (default `https://grafana.lan.ddnsgeek.com`): origin allowed for browser-based panel actions.
## Endpoints
- `GET /_mtls_bridge/health` returns `200 OK` for container health checks.
- `/*` proxies requests to `${TARGET_URL}/*` with method/body/headers/query string preserved (subject to optional allow-list checks).
Examples with `TARGET_URL=http://node-red:1880`:
- `https://mtls-bridge.../docker-update-lockouts/clear` -> `http://node-red:1880/docker-update-lockouts/clear`
- `https://mtls-bridge.../health` -> `http://node-red:1880/health`
- `https://mtls-bridge.../uptime-kuma` -> `http://node-red:1880/uptime-kuma`
## Compose integration
This repository includes `monitoring/mtls-bridge/docker-compose.yml`:
- No public port exposure.
- Read-only cert mount (`${PROJECT_ROOT}/core/traefik/certs:/certs:ro`).
- Joined to internal monitoring/traefik networks.
## Example test
```bash
curl http://mtls-bridge:8080/_mtls_bridge/health
curl -X POST http://mtls-bridge:8080/docker-update-lockouts/clear
```
## Allow-list file example
```text
# one path per line
/docker-update-lockouts/clear
/health
/uptime-kuma
```
When `ALLOWED_PATHS_FILE` is set, any path not listed returns `403 Endpoint not allowed`.
@@ -0,0 +1,208 @@
import logging
import os
import time
from urllib.parse import urljoin
import requests
from flask import Flask, Response, g, request
app = Flask(__name__)
logging.basicConfig(
level=os.environ.get("LOG_LEVEL", "INFO"),
format="%(asctime)s %(levelname)s %(message)s",
)
logger = logging.getLogger("mtls-bridge")
logging.getLogger("werkzeug").setLevel(logging.WARNING)
# Config via env
TARGET_URL = (os.environ.get("TARGET_URL") or "").strip()
CLIENT_CERT = os.environ.get("CLIENT_CERT", "/certs/client.crt")
CLIENT_KEY = os.environ.get("CLIENT_KEY", "/certs/client.key")
UPSTREAM_CA_CERT = os.environ.get("UPSTREAM_CA_CERT", os.environ.get("CA_CERT", "")).strip()
TIMEOUT = int(os.environ.get("TIMEOUT", "5"))
HEALTH_ENDPOINT = os.environ.get("HEALTH_ENDPOINT", "/_mtls_bridge/health")
ALLOWED_PATHS_FILE = (os.environ.get("ALLOWED_PATHS_FILE") or "").strip()
def normalize_path(path: str) -> str:
if not path or path == "/":
return "/"
return f"/{path.lstrip('/')}"
def load_allowed_paths() -> set[str]:
if not ALLOWED_PATHS_FILE:
return set()
if not os.path.exists(ALLOWED_PATHS_FILE):
logger.warning("ALLOWED_PATHS_FILE does not exist: %s (allow-list disabled)", ALLOWED_PATHS_FILE)
return set()
allowed_paths = set()
with open(ALLOWED_PATHS_FILE, encoding="utf-8") as f:
for line in f:
entry = line.strip()
if not entry or entry.startswith("#"):
continue
allowed_paths.add(normalize_path(entry))
logger.info("loaded %s allowed path(s) from %s", len(allowed_paths), ALLOWED_PATHS_FILE)
return allowed_paths
def get_verify_setting():
if not UPSTREAM_CA_CERT:
return True
lowered = UPSTREAM_CA_CERT.lower()
if lowered in {"false", "0", "no"}:
logger.warning("TLS verification for upstream is disabled via UPSTREAM_CA_CERT=%s", UPSTREAM_CA_CERT)
return False
if not os.path.exists(UPSTREAM_CA_CERT):
logger.warning(
"Configured UPSTREAM_CA_CERT path does not exist: %s (falling back to system CA bundle)",
UPSTREAM_CA_CERT,
)
return True
return UPSTREAM_CA_CERT
VERIFY_SETTING = get_verify_setting()
ALLOWED_PATHS = load_allowed_paths()
if TARGET_URL and TARGET_URL.lower().startswith("http://"):
logger.warning("TARGET_URL uses http:// (plaintext): %s", TARGET_URL)
logger.info(
"mtls-bridge starting target_url=%s timeout=%ss cert=%s key=%s verify=%s health_endpoint=%s allow_list_file=%s allow_list_entries=%s log_level=%s",
TARGET_URL,
TIMEOUT,
CLIENT_CERT,
CLIENT_KEY,
VERIFY_SETTING,
HEALTH_ENDPOINT,
ALLOWED_PATHS_FILE,
len(ALLOWED_PATHS),
os.environ.get("LOG_LEVEL", "INFO"),
)
def build_upstream_url(path: str) -> str:
"""Map incoming path directly onto TARGET_URL origin/base path."""
if not TARGET_URL:
raise ValueError("TARGET_URL is not set")
normalized_target = TARGET_URL.rstrip("/") + "/"
normalized_path = path.lstrip("/")
upstream_url = urljoin(normalized_target, normalized_path)
if request.query_string:
upstream_url = f"{upstream_url}?{request.query_string.decode('utf-8', 'ignore')}"
return upstream_url
def is_path_allowed(request_path: str) -> bool:
if not ALLOWED_PATHS:
return True
return request_path in ALLOWED_PATHS
@app.route(HEALTH_ENDPOINT, methods=["GET"])
def health():
logger.debug("healthcheck request from %s", request.remote_addr)
return "OK", 200
@app.before_request
def before_request():
g.request_start = time.time()
@app.after_request
def after_request(response):
elapsed_ms = int((time.time() - g.request_start) * 1000)
if request.path != HEALTH_ENDPOINT:
logger.info(
"request complete method=%s path=%s status=%s elapsed_ms=%s",
request.method,
request.path,
response.status_code,
elapsed_ms,
)
return response
@app.route(
"/",
defaults={"path": ""},
methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"],
provide_automatic_options=False,
)
@app.route(
"/<path:path>",
methods=["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS", "HEAD"],
provide_automatic_options=False,
)
def proxy(path):
request_path = normalize_path(path)
request_size = len(request.get_data(cache=True))
logger.info(
"incoming request method=%s path=%s query=%s remote=%s bytes=%s",
request.method,
request_path,
request.query_string.decode("utf-8", "ignore"),
request.remote_addr,
request_size,
)
if not is_path_allowed(request_path):
logger.warning("request blocked by allow-list path=%s", request_path)
return Response("Endpoint not allowed", status=403)
try:
upstream_url = build_upstream_url(path)
headers = {k: v for k, v in request.headers if k.lower() != "host"}
headers["X-Forwarded-By"] = "mtls-bridge"
start_time = time.time()
resp = requests.request(
method=request.method,
url=upstream_url,
headers=headers,
data=request.get_data(cache=True),
cookies=request.cookies,
cert=(CLIENT_CERT, CLIENT_KEY),
verify=VERIFY_SETTING,
timeout=TIMEOUT,
allow_redirects=False,
)
elapsed_ms = int((time.time() - start_time) * 1000)
logger.info(
"upstream response status=%s url=%s elapsed_ms=%s response_bytes=%s",
resp.status_code,
upstream_url,
elapsed_ms,
len(resp.content),
)
excluded_headers = {"content-encoding", "content-length", "transfer-encoding", "connection"}
response_headers = [(k, v) for k, v in resp.headers.items() if k.lower() not in excluded_headers]
return Response(resp.content, resp.status_code, response_headers)
except ValueError as exc:
logger.error("proxy request failed: %s", exc)
return Response(str(exc), status=500)
except Exception as exc: # noqa: BLE001
logger.exception("proxy request failed")
return Response(str(exc), status=500)
if __name__ == "__main__":
app.run(host="0.0.0.0", port=8080)
@@ -0,0 +1,49 @@
services:
mtls-bridge:
profiles: ["monitoring", "all", "mtls-bridge"]
build:
context: ${PROJECT_ROOT}/monitoring/mtls-bridge
container_name: mtls-bridge
hostname: mtls-bridge.lan.ddnsgeek.com
restart: unless-stopped
environment:
- TARGET_URL=${MTLS_BRIDGE_TARGET_URL}
- CLIENT_CERT=${MTLS_BRIDGE_CLIENT_CERT}
- CLIENT_KEY=${MTLS_BRIDGE_CLIENT_KEY}
- TIMEOUT=${MTLS_BRIDGE_TIMEOUT}
- LOG_LEVEL=${MTLS_BRIDGE_LOG_LEVEL:-INFO}
- UPSTREAM_CA_CERT=${MTLS_BRIDGE_UPSTREAM_CA_CERT:-}
- ALLOWED_PATHS_FILE=${MTLS_BRIDGE_ALLOWED_PATHS_FILE:-}
volumes:
- ${PROJECT_ROOT}/core/traefik/certs:/certs:ro
labels:
- "traefik.http.routers.mtls-bridge.rule=Host(`mtls-bridge.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.mtls-bridge.entrypoints=websecure"
- "traefik.http.routers.mtls-bridge.tls.certresolver=myresolver"
- "traefik.http.routers.mtls-bridge.middlewares=mtls-bridge-auth,mtls-bridge-cors"
- "traefik.http.middlewares.mtls-bridge-auth.basicauth.users=${MTLS_BRIDGE_BASIC_AUTH_USERS}"
- "traefik.http.routers.mtls-bridge-preflight.rule=Host(`mtls-bridge.lan.ddnsgeek.com`) && Method(`OPTIONS`)"
- "traefik.http.routers.mtls-bridge-preflight.entrypoints=websecure"
- "traefik.http.routers.mtls-bridge-preflight.tls.certresolver=myresolver"
- "traefik.http.routers.mtls-bridge-preflight.middlewares=mtls-bridge-cors"
- "traefik.http.routers.mtls-bridge-preflight.priority=100"
- "traefik.http.routers.mtls-bridge-preflight.service=mtls-bridge"
- "traefik.http.middlewares.mtls-bridge-cors.headers.accesscontrolalloworiginlist=${MTLS_BRIDGE_CORS_ALLOW_ORIGIN}"
- "traefik.http.middlewares.mtls-bridge-cors.headers.accesscontrolallowmethods=GET,POST,PUT,PATCH,DELETE,OPTIONS"
- "traefik.http.middlewares.mtls-bridge-cors.headers.accesscontrolallowheaders=authorization,content-type,x-grafana-action,x-grafana-device-id"
- "traefik.http.middlewares.mtls-bridge-cors.headers.accesscontrolallowcredentials=true"
- "traefik.http.middlewares.mtls-bridge-cors.headers.addvaryheader=true"
- "io.portainer.accesscontrol.public"
# - "traefik.http.routers.searxng.middlewares=crowdsec@file,secHeaders@file,error-pages-middleware"
- "traefik.http.services.mtls-bridge.loadbalancer.server.port=8080"
- "traefik.docker.network=core_traefik"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8080/_mtls_bridge/health', timeout=3).read()"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
networks:
- monitor
- traefik
@@ -0,0 +1,2 @@
flask
requests
@@ -0,0 +1,23 @@
services:
node-exporter:
profiles: ["monitoring","all","node-exporter", "prometheus"]
image: prom/node-exporter:latest
container_name: node-exporter
pid: host
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- "--path.procfs=/host/proc"
- "--path.sysfs=/host/sys"
- "--path.rootfs=/rootfs"
restart: unless-stopped
networks:
# - edge
- monitor
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9100/metrics"]
interval: 30s
timeout: 10s
retries: 3
@@ -0,0 +1,7 @@
FROM nodered/node-red:latest
USER root
RUN apk add --no-cache docker-cli docker-cli-compose
#RUN addgroup -g 131 -S docker && addgroup node-red docker
USER node-red
@@ -0,0 +1,160 @@
# Node-RED update logging for Grafana
This guide adds structured update-event logging to your existing Node-RED + Telegraf + Prometheus + Grafana stack without introducing Loki.
## Goal
Track and surface (in Grafana) the latest update attempts from Node-RED, including:
- when an update attempt started,
- target container/project,
- success/failure,
- optional failure reason,
- elapsed duration.
## 1) Add a reusable logger function in Node-RED
Create a **Function** node named `Build update log event` and use:
```javascript
const nowIso = new Date().toISOString();
const startedAt = msg.update_started_at || Date.now();
const durationMs = Math.max(0, Date.now() - startedAt);
const payload = msg.payload || {};
const labels = payload.labels || {};
const status = (msg.update_status || payload.status || "unknown").toString().toLowerCase();
const success = status === "success" ? 1 : 0;
const failed = status === "failed" ? 1 : 0;
msg.payload = {
ts: nowIso,
flow: "docker-updates",
event: msg.update_event || "attempt",
container: msg.container || labels.container || "unknown",
project: labels.com_docker_compose_project || msg.project || "unknown",
host: msg.host || "unknown",
status,
success,
failed,
duration_ms: durationMs,
code: Number.isFinite(Number(payload.code)) ? Number(payload.code) : 0,
error: (msg.update_error || payload.error || "").toString().slice(0, 300)
};
// one JSON line per event for file output
msg.payload = JSON.stringify(msg.payload);
return msg;
```
### Wiring recommendation
Use the same logger function in these branches:
- before a pull/update command (`update_status=started`, `update_event=attempt`),
- success path (`update_status=success`, `update_event=completed`),
- failure path (`update_status=failed`, `update_event=completed`, and include `msg.update_error`).
Then route each branch into a **File** node configured as:
- Filename: `/data/update-events.ndjson`
- Action: append to file
- Add newline: enabled
## 2) Make update state explicit in existing update flow
In your current update flow (already present in `flows.json`), add/change **Change** nodes around your shell/docker nodes:
- At update start:
- `msg.update_started_at = $millis()`
- `msg.update_status = "started"`
- `msg.update_event = "attempt"`
- At success:
- `msg.update_status = "success"`
- `msg.update_event = "completed"`
- At failure:
- `msg.update_status = "failed"`
- `msg.update_event = "completed"`
- `msg.update_error = msg.payload.stderr` (or equivalent error field)
## 3) Let Telegraf ingest Node-RED event logs
Append this to `monitoring/telegraf/telegraf.conf`:
```toml
[[inputs.tail]]
files = ["/var/log/node-red/update-events.ndjson"]
from_beginning = false
name_override = "node_red_update_event"
data_format = "json_v2"
[[inputs.tail.json_v2]]
measurement_name = "node_red_update_event"
[[inputs.tail.json_v2.tag]]
path = "flow"
[[inputs.tail.json_v2.tag]]
path = "event"
[[inputs.tail.json_v2.tag]]
path = "container"
[[inputs.tail.json_v2.tag]]
path = "project"
[[inputs.tail.json_v2.tag]]
path = "host"
[[inputs.tail.json_v2.tag]]
path = "status"
[[inputs.tail.json_v2.field]]
path = "success"
type = "int"
[[inputs.tail.json_v2.field]]
path = "failed"
type = "int"
[[inputs.tail.json_v2.field]]
path = "duration_ms"
type = "int"
[[inputs.tail.json_v2.field]]
path = "code"
type = "int"
```
And mount the Node-RED data directory into Telegraf (read-only) in `monitoring/prometheus/docker-compose.yml` under `telegraf.volumes`:
```yaml
- ${PROJECT_ROOT}/monitoring/node-red/data:/var/log/node-red:ro
```
## 4) Prometheus scrape (already in place)
No Prometheus scrape change is required as long as it already scrapes Telegraf (`telegraf:9273`).
## 5) Grafana queries to start with
Use your Prometheus data source and try:
- Latest success/failure by container:
- `last_over_time(node_red_update_event_success[24h])`
- `last_over_time(node_red_update_event_failed[24h])`
- Failed updates in the last 24h:
- `sum by (container, project) (increase(node_red_update_event_failed[24h]))`
- Average update duration in last 24h:
- `avg by (container, project) (avg_over_time(node_red_update_event_duration_ms[24h]))`
Recommended panels:
- **Table**: container, project, status (last value), duration_ms (last value)
- **Time series**: failed count over time
- **Stat**: total failed updates in last 24h
## 6) Validation checklist
1. Trigger a known update path (including one failure if possible).
2. Check Node-RED log file:
- `tail -n 20 monitoring/node-red/data/update-events.ndjson`
3. Check Telegraf metrics endpoint for `node_red_update_event_` metrics.
4. Confirm Grafana panel values match the latest Node-RED run.
## Optional next step
If you want searchable raw log text and richer log UX, add Loki + Promtail later. Keep this structured metrics path for high-signal alerting even after adding logs.
@@ -0,0 +1,67 @@
services:
node-red:
profiles: ["monitoring","all","node-red"]
# image: nodered/node-red:latest
build:
context: ${PROJECT_ROOT}/monitoring/node-red
container_name: node-red
restart: unless-stopped
depends_on:
- docker-socket-proxy
environment:
DOCKER_HOST: ${DOCKER_SOCKET_PROXY_HOST}
TZ: ${TZ}
PROJECT_ROOT: ${NODE_COMPOSE_ROOT}
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
# ports:
# - "1880:1880"
volumes:
# - ${PROJECT_ROOT}/monitoring/node-red/data:/data
- ${DOCKER_VOLUMES}/node-red-data:/data
- ${PROJECT_ROOT}:/compose/docker:ro
- /home/nixos/raspi:/compose/raspi:ro
# - ${PROJECT_ROOT}:/usr/src/node-red:ro
# - ${PROJECT_ROOT}/default-environment.env:/usr/src/node-red/default-environment.env:ro
# - ${PROJECT_ROOT}/default-network.yml:/usr/src/node-red/default-network.yml:ro
# - ${PROJECT_ROOT}/core/docker-compose.yml:/usr/src/node-red/core/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/prometheus/docker-compose.yml:/usr/src/node-red/monitoring/prometheus/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/gotify/docker-compose.yml:/usr/src/node-red/monitoring/gotify/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/grafana/docker-compose.yml:/usr/src/node-red/monitoring/grafana/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/portainer/docker-compose.yml:/usr/src/node-red/monitoring/portainer/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/uptime-kuma/docker-compose.yml:/usr/src/node-red/monitoring/uptime-kuma/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/gitea/docker-compose.yml:/usr/src/node-red/apps/gitea/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/gramps/docker-compose.yml:/usr/src/node-red/apps/gramps/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/nextcloud/docker-compose.yml:/usr/src/node-red/apps/nextcloud/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/passbolt/docker-compose.yml:/usr/src/node-red/apps/passbolt/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/searxng/docker-compose.yml:/usr/src/node-red/apps/searxng/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/shift-recorder/docker-compose.yml:/usr/src/node-red/apps/shift-recorder/docker-compose.yml:ro
# - ${PROJECT_ROOT}/apps/stockfill/docker-compose.yml:/usr/src/node-red/apps/stockfill/docker-compose.yml:ro
# - ${PROJECT_ROOT}/monitoring/node-red/docker-compose.yml:/usr/src/node-red/monitoring/node-red/docker-compose.yml:ro
# - ${PROJECT_ROOT}/core/test/docker-compose.yml:/usr/src/node-red/core/test/docker-compose.yml:ro
# - ${PROJECT_ROOT}/secrets/stack-secrets.env:/usr/src/node-red/secrets/stack-secrets.env:ro
# - /run/current-system/sw/bin/docker:/usr/bin/docker:ro
# depends_on:
# - mosquitto
# - influxdb
networks:
- monitor
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.node-red.rule=Host(`node-red.lan.ddnsgeek.com`)"
# - "traefik.http.routers.node-red.service=api@internal"
- "traefik.http.routers.node-red.entrypoints=websecure"
- "traefik.http.routers.node-red.tls.certresolver=myresolver"
- "traefik.http.routers.node-red.tls.options=mtls-private-admin@file"
- "traefik.http.routers.node-red.middlewares=authelia"
- "io.portainer.accesscontrol.public"
- "traefik.docker.network=core_traefik"
- "traefik.http.services.node-red.loadbalancer.server.port=1880"
#volumes:
# node-red-data:
# external: true
@@ -0,0 +1,17 @@
services:
pihole-exporter:
profiles: ["monitoring","all","pihole-exporter", "prometheus"]
image: ekofr/pihole-exporter:latest
container_name: pihole-exporter
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
environment:
PIHOLE_HOSTNAME: ${PIHOLE_HOSTNAME}
PIHOLE_PASSWORD: ${PIHOLE_PASSWORD}
PORT: ${PIHOLE_EXPORTER_PORT}
ports:
- "${PIHOLE_EXPORTER_PORT}:${PIHOLE_EXPORTER_PORT}"
restart: unless-stopped
networks:
# - edge
- monitor
@@ -0,0 +1,44 @@
services:
portainer:
profiles: ["monitoring","all","portainer"]
image: portainer/portainer-ce:latest
container_name: portainer
restart: unless-stopped
depends_on:
- docker-socket-proxy
command: -H ${DOCKER_SOCKET_PROXY_HOST}
volumes:
- ${PROJECT_ROOT}/monitoring/portainer/data:/data
networks:
# - traefik_reverse_proxy
- traefik
labels:
- traefik.enable=true
# Router
- traefik.http.routers.portainer.rule=Host(`portainer.lan.ddnsgeek.com`)
- traefik.http.routers.portainer.entrypoints=websecure
- traefik.http.routers.portainer.tls=true
- traefik.http.routers.portainer.tls.certresolver=myresolver
- traefik.http.routers.portainer.tls.options=mtls-private-admin@file
- io.portainer.accesscontrol.public
# Service -> Portainer listens on 9000 inside the container
- traefik.http.services.portainer.loadbalancer.server.port=9000
environment:
- GODEBUG=${PORTAINER_GODEBUG}
- TZ=${TZ}
- DOCKER_HOST=tcp://docker-socket-proxy:2375
# healthcheck:
# test: ["CMD", "wget", "--spider", "-q", "https://portainer.lan.ddnsgeek.com/api/status"]
# interval: 30s
# timeout: 10s
# retries: 3
# start_period: 30s
#networks:
# traefik_reverse_proxy:
# external: true
# internal:
# driver: bridge
@@ -0,0 +1,56 @@
services:
prometheus:
profiles: ["monitoring","all","prometheus"]
image: prom/prometheus:latest
# env_file:
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
container_name: prometheus
depends_on:
# - alertmanager
- telegraf
- influxdb
- node-exporter
- docker-update-exporter
- pihole-exporter
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention.time=15d"
# build:
# context: ${PROJECT_ROOT}/monitoring/prometheus
volumes:
- ${PROJECT_ROOT}/monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
# - ${PROJECT_ROOT}/monitoring/prometheus/data:/prometheus
# - ${PROJECT_ROOT}/monitoring/prometheus/rules:/etc/prometheus/rules:ro
- ${DOCKER_VOLUMES}/prometheus/data:/prometheus
- ${DOCKER_VOLUMES}/prometheus/rules:/etc/prometheus/rules:ro
- ${PROJECT_ROOT}/secrets/prometheus_kuma_basic_auth_password.txt:/run/secrets/prometheus_kuma_basic_auth_password:ro
restart: unless-stopped
labels:
- "traefik.http.routers.prometheus.rule=Host(`prometheus.lan.ddnsgeek.com`)"
- "traefik.enable=true"
- "traefik.http.routers.prometheus.entrypoints=websecure"
- "traefik.http.routers.prometheus.tls.certresolver=myresolver"
- "traefik.http.routers.prometheus.tls.options=mtls-private-admin@file"
- "io.portainer.accesscontrol.public"
- "traefik.http.services.prometheus.loadbalancer.server.port=9090"
- "traefik.http.routers.prometheus.middlewares=authelia"
- "traefik.docker.network=core_traefik"
networks:
# - edge
# - traefik_reverse_proxy
- traefik
- monitor
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:9090/-/healthy"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
#volumes:
# prometheus-data:
# external: true
# prometheus-rules:
# external: true
@@ -0,0 +1,166 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
#alerting:
# alertmanagers:
# - static_configs:
# - targets:
# - alertmanager:9093
scrape_configs:
# Prometheus itself
- job_name: "prometheus"
static_configs:
- targets: ["prometheus:9090"]
labels:
role: prometheus
# =========================
# Node Exporters (ALL hosts)
# =========================
- job_name: "node"
static_configs:
- targets:
- node-exporter:9100
labels:
role: docker
- targets:
- raspberrypi.tail13f623.ts.net:9100
labels:
role: raspberrypi
- targets:
- pve.sweet.home:9100
labels:
role: proxmox
- targets:
- pbs.sweet.home:9100
labels:
role: backup
- targets:
- pihole:9100
labels:
role: pihole
- targets:
- server:9100
labels:
role: server
- targets:
- nix-cache:9100
labels:
role: cache
# =========================
# Telegraf (Docker metrics)
# =========================
- job_name: "telegraf"
static_configs:
- targets:
- telegraf:9273
- raspberrypi.tail13f623.ts.net:9273
labels:
role: docker
# =========================
# Traefik (all instances)
# =========================
- job_name: "traefik"
static_configs:
- targets:
- traefik.lan.ddnsgeek.com:8080
labels:
role: docker
- targets:
- raspberrypi.tail13f623.ts.net:8080
labels:
role: raspberrypi
metric_relabel_configs:
- source_labels: [service]
regex: '(.+)@.+'
target_label: service
replacement: '$1'
# =========================
# Uptime Kuma (separate due to auth)
# =========================
- job_name: "kuma"
metrics_path: /metrics
scrape_interval: 30s
basic_auth:
username: wayne.bennett@live.com
password_file: /run/secrets/prometheus_kuma_basic_auth_password
# password: '4vjCco?[%{=+,t`):C'
static_configs:
- targets:
- monitor-kuma:3001
labels:
role: docker
- targets:
- kuma.lan.ddnsgeek.com
labels:
role: raspberrypi
tls_config:
# ca_file: /prometheus/clients-ca.crt
cert_file: /prometheus/office-pc.crt
key_file: /prometheus/office-pc.key
# server_name: kuma.lan.ddnsgeek.com
# =========================
# Proxmox Storage Exporters
# =========================
- job_name: "proxmox-storage"
metrics_path: /metrics
static_configs:
- targets:
- pve.sweet.home:9101
labels:
role: proxmox
storage: lvm
# - targets:
# - pbs.sweet.home:9102
# labels:
# role: backup
# storage: datastore
# =========================
# Docker Updates Exporter
# =========================
- job_name: "container-updates"
static_configs:
- targets:
- docker-update-exporter:9105
labels:
role: docker
- targets:
- raspberrypi.tail13f623.ts.net:9105
labels:
role: raspberrypi
# =========================
# pihole Exporter
# =========================
- job_name: "pihole"
static_configs:
- targets:
- pihole-exporter:9617
labels:
role: pihole
#rule_files:
# - /etc/prometheus/rules/*.yml
@@ -0,0 +1,192 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["prometheus:9090"]
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "docker-node"
static_configs:
- targets: ["node-exporter:9100"]
labels:
type: "virtual"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
# - job_name: "cadvisor"
# static_configs:
# - targets: ["cadvisor:8080"]
# labels:
# type: "container"
# relabel_configs:
# - source_labels: [__address__]
# regex: '([^:]+):.*'
# target_label: instance
- job_name: "raspberrypi-node"
static_configs:
- targets:
- "raspberrypi.tail13f623.ts.net:9100"
labels:
type: "physical"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "proxmox-node"
static_configs:
- targets:
- "pve.sweet.home:9100"
labels:
type: "physical"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "proxmox-backup-server"
static_configs:
- targets:
- "pbs.sweet.home:9100"
labels:
type: "virtual"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "pihole"
static_configs:
- targets:
- "pihole:9100"
labels:
type: "virtual"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "server"
static_configs:
- targets:
- "server:9100"
labels:
type: "virtual"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: "nix-cache"
static_configs:
- targets:
- "nix-cache:9100"
labels:
type: "virtual"
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: docker
static_configs:
- targets: ['telegraf:9273']
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: 'traefik'
static_configs:
- targets: ['traefik.lan.ddnsgeek.com:8080'] # replace with your Traefik host:port
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
metric_relabel_configs:
- source_labels: [service]
regex: '(.+)@.+'
target_label: service
replacement: '$1'
- job_name: 'raspi-traefik'
static_configs:
- targets: ['raspberrypi.tail13f623.ts.net:8080'] # replace with your Traefik host:port
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
metric_relabel_configs:
- source_labels: [service]
regex: '(.+)@.+'
target_label: service
replacement: '$1'
- job_name: 'raspi-kuma'
metrics_path: /metrics
scrape_interval: 30s
basic_auth:
username: wayne.bennett@live.com
password: '4vjCco?[%{=+,t`):C'
static_configs:
- targets:
- kuma.lan.ddnsgeek.com
- job_name: 'docker-kuma'
metrics_path: /metrics
scrape_interval: 30s
basic_auth:
username: wayne.bennett@live.com
password: '4vjCco?[%{=+,t`):C'
static_configs:
- targets:
- uptime-kuma:3001
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: 'proxmox LVM storage'
static_configs:
- targets: ['pve.sweet.home:9101']
metrics_path: /metrics
scheme: http
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
- job_name: 'proxmox backup storage'
static_configs:
- targets: ['pbs.sweet.home:9102']
metrics_path: /metrics
scheme: http
relabel_configs:
- source_labels: [__address__]
regex: '([^:]+):.*'
target_label: instance
rule_files:
- /etc/prometheus/rules/*.yml
@@ -0,0 +1,26 @@
services:
telegraf:
profiles: ["monitoring","all","telegraf", "prometheus"]
image: telegraf:latest
container_name: telegraf
restart: unless-stopped
depends_on:
- docker-socket-proxy
# cap_drop:
# - ALL
security_opt:
- no-new-privileges:true
volumes:
- ${PROJECT_ROOT}/monitoring/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro
# - ${PROJECT_ROOT}/monitoring/node-red/data:/var/log/node-red:ro
- ${DOCKER_VOLUMES}/node-red-data:/var/log/node-red:ro
networks:
# - edge
- monitor
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9273/metrics || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
@@ -0,0 +1,45 @@
[agent]
interval = "10s"
[[inputs.docker]]
endpoint = "tcp://docker-socket-proxy:2375"
gather_services = false
[[outputs.prometheus_client]]
listen = ":9273"
# Node-RED update-event logs (structured NDJSON) -> Prometheus metrics for Grafana
[[inputs.tail]]
files = ["/var/log/node-red/update-events.ndjson"]
from_beginning = false
name_override = "node_red_update_event"
data_format = "json_v2"
[[inputs.tail.json_v2]]
measurement_name = "node_red_update_event"
[[inputs.tail.json_v2.tag]]
path = "flow"
[[inputs.tail.json_v2.tag]]
path = "event"
[[inputs.tail.json_v2.tag]]
path = "container"
[[inputs.tail.json_v2.tag]]
path = "project"
[[inputs.tail.json_v2.tag]]
path = "host"
[[inputs.tail.json_v2.tag]]
path = "status"
[[inputs.tail.json_v2.field]]
path = "success"
type = "int"
[[inputs.tail.json_v2.field]]
path = "failed"
type = "int"
[[inputs.tail.json_v2.field]]
path = "duration_ms"
type = "int"
[[inputs.tail.json_v2.field]]
path = "code"
type = "int"
-5
View File
@@ -1,5 +0,0 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
/secrets.yaml
-238
View File
@@ -1,238 +0,0 @@
esphome:
name: esphome-garage
friendly_name: esphome garage
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
version: 2.0.6
external_components:
- source: github://Jorre05/remote_receiver
components: [ remote_receiver ]
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "JSYF44AI5ggGlJbuezald9//7NzOqQ0xeixs2NeEna8="
ota:
password: !secret ota_password
wifi:
networks:
- ssid: !secret ssid_garage
password: !secret wifi_password
- ssid: !secret ssid_house
password: !secret wifi_password
domain: .alm.lan
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Esphome-Garage Fallback Hotspot"
password: "TxX9BHoIG7GT"
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
timezone: Australia/Brisbane
remote_receiver:
pin:
number: 40
inverted: true
mode:
input: true
pullup: true
rmt_channel: 5
dump: raw
buffer_size: 20kb
tolerance: 50%
filter: 250us
idle: 4ms
remote_transmitter:
pin:
number: 42
# Infrared remotes use a 50% carrier signal
carrier_duty_percent: 50%
binary_sensor:
- platform: status
name: "Availibility"
- platform: gpio
pin:
number: 8
mode:
input: true
pullup: true
name: "Motion Detection"
sensor:
- platform: wifi_signal
name: "WiFi Signal Strength"
update_interval: 60s
- platform: uptime
name: Uptime
- platform: internal_temperature
name: "Internal Temperature"
button:
- platform: restart
name: "Reset"
- platform: template
id: sound_bar_mute
name: Sound Bar Mute
icon: "mdi:volume-mute"
on_press:
- remote_transmitter.transmit_raw:
code: [9165, -4370, 709, -1563, 698, -1549, 700, -1547, 701, -1546, 700, -1547, 697, -435, 705, -1546, 697, -1550, 695, -439, 703, -1547, 697, -1550, 701, -431, 700, -438, 701, -1551, 698, -431, 705, -1550, 696, -434, 706, -537, 705, -1442, 699, -1442, 697, -544, 704, -1546, 698, -1443, 700, -430, 709, -1543, 702, -1441, 701, -537, 709, -532, 707, -1435, 708, -430, 704, -534, 709, -1539, 709]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
carrier_frequency: 38kHz
code: [9167,-2118,729]
repeat:
times: 5
# wait_time: 240ms
- platform: template
id: sound_bar_vol_up
name: Sound Bar Vol +
icon: "mdi:volume-plus"
on_press:
- remote_transmitter.transmit_raw:
code: [9149, -4385, 687, -1581, 670, -1577, 670, -1577, 668, -1579, 670, -1577, 672, -455, 680, -1577, 670, -1578, 669, -460, 680, -1576, 669, -1578, 670, -462, 675, -460, 676, -1579, 668, -463, 674, -1579, 670, -462, 675, -1577, 669, -460, 677, -462, 674, -1579, 668, -1579, 668, -465, 672, -464, 672, -1578, 670, -464, 672, -1578, 670, -1577, 667, -467, 670, -467, 670, -1579, 668, -1579, 669]
carrier_frequency: 38kHz
- platform: template
id: sound_bar_vol_down
name: Sound Bar Vol -
icon: "mdi:volume-minus"
on_press:
- remote_transmitter.transmit_raw:
code: [9151, -4389, 685, -1582, 668, -1579, 667, -1580, 667, -1580, 668, -1580, 667, -466, 669, -1582, 667, -1581, 667, -467, 668, -1583, 667, -1580, 667, -467, 669, -468, 670, -1581, 668, -466, 669, -1581, 670, -1577, 669, -464, 670, -468, 668, -468, 669, -1582, 667, -1580, 668, -466, 669, -467, 671, -466, 670, -1580, 668, -1579, 668, -1580, 669, -466, 669, -468, 669, -1580, 668, -1580, 667]
carrier_frequency: 38kHz
- platform: template
id: ac_mode_heat
name: AC Mode Heat
icon: "mdi:heat-wave"
on_press:
- remote_transmitter.transmit_raw:
code: [3626, -3343, 1014, -761, 981, -761, 983, -2471, 1014, -2473, 1013, -761, 981, -733, 1011, -2471, 1014, -761, 982, -760, 983, -761, 981, -2473, 1012, -2474, 1012, -762, 1008, -734, 982, -2474, 1011, -763, 980, -762, 980, -790, 954, -2473, 1013, -2473, 1012, -762, 980, -762, 982, -762, 981, -761, 982, -762, 981, -761, 982, -2472, 1014, -2472, 1013, -762, 980, -761, 958, -784, 958, -785, 3596, -3347, 987, -782, 961, -782, 982, -2477, 986, -2500, 1009, -758, 985, -758, 984, -2477, 1009, -758, 984, -759, 984, -738, 1004, -2479, 1035, -2450, 1008, -732, 1014, -729, 1015, -2473, 1013, -727, 1015, -729, 1012, -731, 1012, -2476, 1007, -2478, 1006, -735, 1008, -735, 1006, -737, 1004, -739, 1001, -742, 1027, -717, 997, -2492, 990, -2519, 965, -776, 966, -777, 941, -802, 966, -777, 3552, -3423, 932]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3513, -3457, 900, -840, 902, -841, 903, -2585, 900, -841, 902, -841, 902, -842, 928, -814, 902, -841, 902, -841, 902, -841, 902, -2587, 898, -842, 901, -842, 901, -843, 900, -843, 900, -867, 876, -867, 876, -2611, 875, -2611, 874, -867, 876, -2613, 872, -2613, 873, -868, 902, -841, 875, -868, 876, -2611, 874, -2613, 873, -867, 874, -2615, 873, -2613, 872, -895, 847, -869, 3489, -3512, 845, -895, 848, -895, 848, -2641, 844, -896, 846, -897, 821, -922, 821, -923, 820, -923, 819, -950, 793, -950, 793, -2695, 790, -951, 792, -967, 776, -978, 764, -980, 763, -979, 316]
carrier_frequency: 38kHz
- platform: template
id: ac_mode_cool
name: AC Mode Cool
icon: "mdi:sun-snowflake"
on_press:
- remote_transmitter.transmit_raw:
code: [3625, -3345, 1012, -760, 1010, -2445, 1013, -2474, 1012, -760, 983, -787, 955, -761, 983, -2474, 1011, -786, 957, -760, 984, -2472, 1012, -2473, 1014, -758, 1011, -732, 984, -759, 1011, -2446, 1013, -758, 984, -759, 985, -2473, 1012, -758, 984, -2474, 1039, -759, 956, -759, 985, -785, 934, -781, 988, -756, 1011, -2448, 985, -784, 960, -2525, 959, -784, 960, -781, 962, -781, 987, -783, 3602, -3319, 1009, -756, 987, -2475, 1010, -2476, 1009, -757, 986, -757, 985, -734, 1009, -2477, 1035, -706, 1011, -758, 986, -2503, 982, -2476, 1008, -732, 1038, -705, 1037, -706, 1009, -2480, 1001, -739, 1005, -738, 1005, -2510, 972, -741, 1000, -2489, 1021, -719, 997, -747, 995, -776, 964, -779, 991, -725, 965, -2547, 939, -801, 940, -2549, 936, -805, 936, -807, 936, -807, 961, -782, 3517, -3459, 898]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3510, -3461, 897, -842, 928, -815, 902, -2587, 898, -843, 901, -870, 872, -868, 902, -840, 903, -840, 876, -867, 875, -895, 855, -2606, 873, -868, 875, -868, 902, -841, 875, -869, 874, -868, 875, -869, 875, -2613, 872, -2640, 874, -841, 874, -2614, 862, -2625, 843, -922, 822, -922, 820, -950, 793, -2668, 587, -2926, 271]
carrier_frequency: 38kHz
- platform: template
id: ac_mode_dry
name: AC Mode Dry
icon: "mdi:air-filter"
on_press:
- remote_transmitter.transmit_raw:
code: [3628, -3344, 989, -2495, 991, -2494, 991, -781, 962, -2495, 989, -2496, 990, -2496, 989, -2497, 1013, -2472, 989, -2497, 988, -2498, 989, -782, 960, -2496, 989, -2497, 989, -2497, 990, -2496, 989, -2495, 991, -2496, 989, -2496, 990, -780, 962, -2496, 989, -781, 986, -756, 988, -755, 962, -781, 986, -2473, 1013, -2473, 1012, -755, 964, -2498, 1010, -757, 987, -755, 986, -756, 987, -734, 3621, -3351, 1008, -2476, 1011, -2475, 1010, -731, 1011, -2478, 1006, -2479, 1004, -2482, 1002, -2483, 1003, -2483, 1002, -2483, 1000, -2486, 998, -742, 1001, -2487, 996, -2489, 996, -2491, 994, -2491, 992, -2495, 990, -2495, 965, -2522, 964, -778, 964, -2547, 937, -803, 940, -803, 938, -805, 936, -808, 934, -2554, 931, -2554, 930, -811, 929, -2560, 899, -842, 901, -842, 901, -841, 902, -841, 3516, -3459, 899]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3511, -3458, 900, -841, 902, -841, 901, -2587, 899, -843, 900, -842, 901, -843, 899, -844, 900, -867, 875, -868, 875, -868, 876, -2612, 873, -868, 875, -868, 875, -868, 875, -868, 876, -868, 881, -861, 876, -2612, 873, -2613, 873, -867, 875, -2614, 872, -2614, 871, -870, 850, -893, 847, -897, 845, -2668, 818, -2667, 819, -922, 820, -2668, 817, -2670, 761, -1006, 592, -1152, 412]
carrier_frequency: 38kHz
- platform: template
id: ac_mode_auto
name: AC Mode Auto
icon: "mdi:auto-mode"
on_press:
- remote_transmitter.transmit_raw:
code: [3602, -3368, 989, -782, 961, -782, 960, -2496, 989, -2496, 990, -782, 961, -2496, 988, -2498, 989, -782, 960, -783, 959, -784, 984, -2473, 987, -2498, 1012, -760, 983, -2474, 988, -2498, 1000, -769, 982, -2477, 986, -784, 983, -2476, 1012, -2473, 993, -777, 984, -759, 984, -759, 960, -783, 983, -2476, 985, -784, 959, -2500, 985, -2501, 1008, -761, 958, -760, 1008, -734, 1007, -734, 3624, -3350, 1009, -731, 1010, -733, 1010, -2476, 1011, -2476, 1011, -730, 1011, -2477, 1008, -2478, 1006, -734, 1007, -736, 1007, -735, 1005, -2483, 1003, -2484, 1001, -739, 1001, -2486, 1000, -2487, 998, -743, 974, -2513, 996, -745, 995, -2492, 994, -2492, 968, -773, 970, -773, 968, -775, 967, -776, 967, -2522, 963, -777, 966, -2522, 963, -2524, 961, -781, 961, -805, 937, -806, 936, -807, 3519, -3456, 902]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3512, -3458, 899, -841, 902, -841, 901, -2587, 899, -842, 901, -842, 901, -842, 901, -842, 909, -834, 903, -840, 902, -841, 903, -2586, 899, -841, 902, -840, 902, -842, 901, -841, 903, -841, 901, -842, 902, -2587, 898, -2587, 899, -842, 901, -2587, 898, -2588, 898, -867, 876, -867, 875, -868, 875, -2613, 873, -2613, 872, -869, 873, -2614, 847, -2640, 852, -889, 848, -894, 3136, -3840, 845, -895, 847, -896, 854, -2634, 843, -924, 629, -1114, 601, -1142, 491, -1252, 462, -1282, 326, -1417, 356, -1387, 301, -3187, 352, -1415, 245, -1499, 200]
carrier_frequency: 38kHz
switch:
- platform: template
id: sound_bar_power
name: Sound Bar Power
icon: "mdi:power"
turn_on_action:
- remote_transmitter.transmit_raw:
code: [9189, -4346, 727, -1546, 709, -1539, 712, -1535, 707, -1540, 707, -1541, 708, -416, 719, -1541, 708, -1540, 707, -416, 720, -1541, 704, -1544, 705, -418, 718, -416, 722, -1543, 706, -415, 721, -1542, 706, -415, 721, -1541, 706, -416, 721, -415, 724, -1539, 707, -418, 720, -415, 724, -416, 723, -1531, 713, -414, 722, -1533, 718, -1528, 720, -412, 722, -1529, 719, -1528, 720, -1527, 721]
carrier_frequency: 38kHz
- switch.template.publish:
id: sound_bar_power
state: ON
turn_off_action:
- remote_transmitter.transmit_raw:
code: [9189, -4346, 727, -1546, 709, -1539, 712, -1535, 707, -1540, 707, -1541, 708, -416, 719, -1541, 708, -1540, 707, -416, 720, -1541, 704, -1544, 705, -418, 718, -416, 722, -1543, 706, -415, 721, -1542, 706, -415, 721, -1541, 706, -416, 721, -415, 724, -1539, 707, -418, 720, -415, 724, -416, 723, -1531, 713, -414, 722, -1533, 718, -1528, 720, -412, 722, -1529, 719, -1528, 720, -1527, 721]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
carrier_frequency: 38kHz
code: [9143, -2145, 687]
repeat:
times: 5
wait_time: 240ms
- switch.template.publish:
id: sound_bar_power
state: OFF
- platform: template
id: soniq_power
name: TV Power
icon: "mdi:power"
turn_on_action:
- remote_transmitter.transmit_raw:
code: [9098, -4473, 716, -455, 692, -1593, 698, -459, 700, -457, 694, -1592, 699, -1589, 700, -1591, 690, -466, 700, -1560, 688, -483, 690, -1575, 699, -1592, 690, -1599, 693, -482, 703, -1569, 691, -1594, 692, -487, 690, -1579, 684, -1599, 693, -1595, 699, -480, 691, -463, 697, -463, 692, -460, 693, -1576, 695, -481, 679, -476, 690, -468, 695, -1574, 678, -1604, 689, -1597, 686, -1603, 684]
carrier_frequency: 38kHz
repeat:
times: 2
wait_time: 5ms
- switch.template.publish:
id: soniq_power
state: ON
turn_off_action:
- remote_transmitter.transmit_raw:
code: [9098, -4473, 716, -455, 692, -1593, 698, -459, 700, -457, 694, -1592, 699, -1589, 700, -1591, 690, -466, 700, -1560, 688, -483, 690, -1575, 699, -1592, 690, -1599, 693, -482, 703, -1569, 691, -1594, 692, -487, 690, -1579, 684, -1599, 693, -1595, 699, -480, 691, -463, 697, -463, 692, -460, 693, -1576, 695, -481, 679, -476, 690, -468, 695, -1574, 678, -1604, 689, -1597, 686, -1603, 684]
carrier_frequency: 38kHz
repeat:
times: 2
wait_time: 5ms
- switch.template.publish:
id: soniq_power
state: OFF
- platform: template
id: ac_power
name: AC Power
icon: "mdi:power"
turn_on_action:
- remote_transmitter.transmit_raw:
code: [3613, -3358, 1000, -2486, 997, -2489, 1000, -767, 976, -2486, 1003, -760, 985, -2480, 995, -768, 982, -760, 977, -2493, 991, -2490, 996, -767, 976, -2490, 995, -763, 980, -2491, 995, -764, 981, -762, 983, -760, 983, -760, 986, -2484, 991, -767, 982, -760, 979, -768, 978, -761, 975, -767, 983, -760, 988, -755, 978, -2493, 992, -765, 974, -769, 982, -761, 980, -762, 980, -766, 3589, -3366, 992, -2493, 992, -2497, 995, -761, 975, -2498, 990, -765, 974, -2500, 982, -763, 983, -760, 982, -2502, 983, -2503, 983, -761, 981, -2511, 974, -762, 976, -2512, 974, -767, 974, -769, 974, -769, 969, -774, 968, -2520, 961, -779, 963, -780, 962, -784, 962, -781, 957, -786, 960, -783, 952, -791, 951, -2537, 948, -797, 942, -801, 941, -806, 937, -806, 929, -814, 3539, -3439, 918]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3526, -3445, 911, -829, 913, -830, 913, -2575, 899, -842, 901, -842, 900, -843, 901, -842, 901, -843, 902, -841, 901, -842, 901, -2587, 899, -842, 901, -842, 900, -843, 903, -840, 901, -842, 903, -840, 902, -2586, 899, -2587, 901, -841, 901, -2587, 900, -2586, 897, -849, 897, -846, 890, -854, 894, -2593, 888, -2598, 892, -854, 884, -2609, 877, -2614, 872, -868, 875, -868, 3489, -3486, 874, -867, 877, -866, 874, -2614, 871, -869, 874, -869, 877, -866, 873, -870, 866, -878, 873, -870, 850, -893, 852, -2637, 842, -909, 802, -941, 797, -947, 771, -972, 776, -967, 776, -977, 743, -2750, 742, -2745, 729, -1011, 715, -2773, 709, -2777, 707]
carrier_frequency: 38kHz
- switch.template.publish:
id: ac_power
state: ON
turn_off_action:
- remote_transmitter.transmit_raw:
code: [3613, -3358, 1000, -2486, 997, -2489, 1000, -767, 976, -2486, 1003, -760, 985, -2480, 995, -768, 982, -760, 977, -2493, 991, -2490, 996, -767, 976, -2490, 995, -763, 980, -2491, 995, -764, 981, -762, 983, -760, 983, -760, 986, -2484, 991, -767, 982, -760, 979, -768, 978, -761, 975, -767, 983, -760, 988, -755, 978, -2493, 992, -765, 974, -769, 982, -761, 980, -762, 980, -766, 3589, -3366, 992, -2493, 992, -2497, 995, -761, 975, -2498, 990, -765, 974, -2500, 982, -763, 983, -760, 982, -2502, 983, -2503, 983, -761, 981, -2511, 974, -762, 976, -2512, 974, -767, 974, -769, 974, -769, 969, -774, 968, -2520, 961, -779, 963, -780, 962, -784, 962, -781, 957, -786, 960, -783, 952, -791, 951, -2537, 948, -797, 942, -801, 941, -806, 937, -806, 929, -814, 3539, -3439, 918]
carrier_frequency: 38kHz
- remote_transmitter.transmit_raw:
code: [3526, -3445, 911, -829, 913, -830, 913, -2575, 899, -842, 901, -842, 900, -843, 901, -842, 901, -843, 902, -841, 901, -842, 901, -2587, 899, -842, 901, -842, 900, -843, 903, -840, 901, -842, 903, -840, 902, -2586, 899, -2587, 901, -841, 901, -2587, 900, -2586, 897, -849, 897, -846, 890, -854, 894, -2593, 888, -2598, 892, -854, 884, -2609, 877, -2614, 872, -868, 875, -868, 3489, -3486, 874, -867, 877, -866, 874, -2614, 871, -869, 874, -869, 877, -866, 873, -870, 866, -878, 873, -870, 850, -893, 852, -2637, 842, -909, 802, -941, 797, -947, 771, -972, 776, -967, 776, -977, 743, -2750, 742, -2745, 729, -1011, 715, -2773, 709, -2777, 707]
carrier_frequency: 38kHz
- switch.template.publish:
id: ac_power
state: OFF
@@ -1,75 +0,0 @@
esphome:
name: esphome-waynes-room
friendly_name: ESPhome Wayne's Room
esp32:
board: esp32-s3-devkitc-1
framework:
type: arduino
version: 2.0.6
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "bZd2q2XkmQH/o/+Jz+gZKMFM8VGA0NRheWp/uYvQRho="
ota:
password: !secret ota_password
wifi:
networks:
- ssid: !secret ssid_garage
password: !secret wifi_password
- ssid: !secret ssid_house
password: !secret wifi_password
domain: .alm.lan
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "esphome-waynes-room"
password: "lHNYq8KWKSJv"
captive_portal:
time:
- platform: homeassistant
id: homeassistant_time
timezone: Australia/Brisbane
i2c:
sda: 17
scl: 18
scan: true
id: bus_a
binary_sensor:
- platform: status
name: "Availibility"
- platform: gpio
pin:
number: 8
mode:
input: true
pullup: true
name: "Motion Detection"
sensor:
- platform: wifi_signal
name: "WiFi Signal Strength"
update_interval: 60s
- platform: uptime
name: Uptime
- platform: bh1750
name: "Light Level"
address: 0x23
update_interval: 5s
- platform: internal_temperature
name: "Internal Temperature"
button:
- platform: restart
name: "Reset"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+60
View File
@@ -0,0 +1,60 @@
server.address: tcp://0.0.0.0:9091
log:
level: info
identity_validation:
reset_password:
jwt_secret: T72Xcxa4d7xpQRypFDZpunlZt0IjqspojmBlxBr69gnkRjzR144YgjZsgFYZK0gS
session:
secret: BYksO7YUAJ8gXx9Endgpe46RgB10nkeKpD1qcQPt0GuYGQm2pS2zjJtNOrCEqpav
cookies:
- domain: lan.ddnsgeek.com
authelia_url: https://auth.lan.ddnsgeek.com
storage:
encryption_key: N7mkWziClgDhLgZDRkRwU6jEHmGF6ciOt53pzoFcZ0meEV1AZCC5bWZd24jeu19y
local:
path: /config/data/db.sqlite3
authentication_backend:
file:
path: /config/users_database.yml
access_control:
default_policy: deny
rules:
- domain: alertmanager.lan.ddnsgeek.com
resources:
- "^/api/.*"
policy: bypass
- domain: influxdb.lan.ddnsgeek.com
resources:
- "^/health"
policy: bypass
- domain: node-red.lan.ddnsgeek.com
resources:
- "^/health"
- "^/uptime-kuma"
- "^/docker-update-lockouts/clear"
policy: bypass
- domain: prometheus.lan.ddnsgeek.com
resources:
- "^/-/healthy"
policy: bypass
- domain: traefik.lan.ddnsgeek.com
resources:
- "^/metrics"
policy: bypass
- domain: "*.lan.ddnsgeek.com"
policy: two_factor
notifier:
filesystem:
filename: /config/data/notification.txt
+34
View File
@@ -0,0 +1,34 @@
services:
authelia:
profiles: ["core","all","authelia", "traefik"]
image: authelia/authelia
restart: always
# build:
# context: ${PROJECT_ROOT}/core/authelia
env_file:
- ${PROJECT_ROOT}/secrets/stack-secrets.env
# environment:
# - AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET=${AUTHELIA_JWT_SECRET}
# - AUTHELIA_SESSION_SECRET=${AUTHELIA_SESSION_SECRET}
# - AUTHELIA_STORAGE_ENCRYPTION_KEY=${AUTHELIA_STORAGE_ENCRYPTION_KEY}
volumes:
# - ${PROJECT_ROOT}/core/authelia:/config
- ${DOCKER_VOLUMES}/authelia-data:/config/data
- ${PROJECT_ROOT}/core/authelia/configuration.yml:/config/configuration.yml:ro
- ${PROJECT_ROOT}/core/authelia/users_database.yml:/config/users_database.yml:ro
networks:
# - reverse_proxy
- traefik
container_name: authelia
labels:
- traefik.enable=true
- traefik.http.routers.authelia.rule=Host(`auth.lan.ddnsgeek.com`)
- traefik.http.routers.authelia.entrypoints=websecure
- traefik.http.routers.authelia.tls=true
- traefik.http.routers.authelia.tls.certresolver=myresolver
- io.portainer.accesscontrol.public
- traefik.http.middlewares.authelia.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.lan.ddnsgeek.com/
- traefik.http.middlewares.authelia.forwardauth.trustForwardHeader=true
- traefik.http.middlewares.authelia.forwardauth.authResponseHeaders=Remote-User,Remote-Groups
- traefik.http.middlewares.authelia.forwardauth.maxResponseBodySize=2097152
- "wud.watch=true"
+6
View File
@@ -0,0 +1,6 @@
FROM crowdsecurity/crowdsec:latest
#COPY config/ /etc/crowdsec
# Install required components at build time
#RUN cscli hub update && \
# cscli collections install crowdsecurity/traefik --force
+31
View File
@@ -0,0 +1,31 @@
services:
crowdsec:
profiles: ["core","all","crowdsec", "traefik"]
image: crowdsecurity/crowdsec:latest
# build: ${PROJECT_ROOT}/core/crowdsec
container_name: crowdsec
restart: always
environment:
- COLLECTIONS=crowdsecurity/traefik
# - CROWDSEC_LAPI_KEY=${CROWDSEC_LAPI_KEY}
volumes:
# - ${PROJECT_ROOT}/core/crowdsec/logs:/logs:ro
# - ${PROJECT_ROOT}/core/crowdsec/data:/var/lib/crowdsec/data
# - ${PROJECT_ROOT}/core/crowdsec/config:/etc/crowdsec
- ${DOCKER_VOLUMES}/crowdsec/logs:/logs:ro
- ${DOCKER_VOLUMES}/crowdsec/data:/var/lib/crowdsec/data
# - ${DOCKER_VOLUMES}/crowdsec/config.yaml:/etc/crowdsec/config.yaml
# - ${DOCKER_VOLUMES}/crowdsec/config:/etc/crowdsec
- ${PROJECT_ROOT}/core/crowdsec/acquis.d:/etc/crowdsec/acquis.d
- ${PROJECT_ROOT}/core/crowdsec/profiles.yaml:/etc/crowdsec/profiles.yaml
networks:
# - reverse_proxy
- traefik
healthcheck:
test: ["CMD-SHELL", "cscli metrics || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
labels:
- "wud.watch=true"
+29
View File
@@ -0,0 +1,29 @@
name: default_ip_remediation
#debug: true
filters:
- Alert.Remediation == true && Alert.GetScope() == "Ip"
decisions:
- type: ban
duration: 4h
#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
# notifications:
# - slack_default # Set the webhook in /etc/crowdsec/notifications/slack.yaml before enabling this.
# - splunk_default # Set the splunk url and token in /etc/crowdsec/notifications/splunk.yaml before enabling this.
# - http_default # Set the required http parameters in /etc/crowdsec/notifications/http.yaml before enabling this.
# - email_default # Set the required email parameters in /etc/crowdsec/notifications/email.yaml before enabling this.
on_success: break
---
name: default_range_remediation
#debug: true
filters:
- Alert.Remediation == true && Alert.GetScope() == "Range"
decisions:
- type: ban
duration: 4h
#duration_expr: Sprintf('%dh', (GetDecisionsCount(Alert.GetValue()) + 1) * 4)
# notifications:
# - slack_default # Set the webhook in /etc/crowdsec/notifications/slack.yaml before enabling this.
# - splunk_default # Set the splunk url and token in /etc/crowdsec/notifications/splunk.yaml before enabling this.
# - http_default # Set the required http parameters in /etc/crowdsec/notifications/http.yaml before enabling this.
# - email_default # Set the required email parameters in /etc/crowdsec/notifications/email.yaml before enabling this.
on_success: break
@@ -0,0 +1,52 @@
services:
docker-socket-proxy:
profiles: ["monitoring","all","docker-socket-proxy", "core", "traefik", "uptime-kuma", "beszel", "wud", "apps"]
image: tecnativa/docker-socket-proxy:latest
container_name: docker-socket-proxy
hostname: docker-socket-proxy
restart: unless-stopped
environment:
LOG_LEVEL: ${DOCKER_SOCKET_PROXY_LOG_LEVEL}
DISTRIBUTION: 1
CONTAINERS: 1
EVENTS: 1
IMAGES: 1
INFO: 1
NETWORKS: 1
PING: 1
POST: 1
AUTH: 1
EXEC: 1
SYSTEM: 1
SERVICES: 1
SWARM: 1
NODES: 1
SECRETS: 1
TASKS: 1
VERSION: 1
VOLUMES: 1
ALLOW_START: 1 # for better security, set to 0
ALLOW_STOP: 1 # for better security, set to 0
ALLOW_RESTARTS: 1 # for better security, set to 0
BUILD: 0
COMMIT: 0
CONFIGS: 0
DELETE: 1
DISABLE_IPV6: 0
PLUGINS: 0
SESSION: 0
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
cap_drop:
- ALL
security_opt:
- no-new-privileges:true
networks:
# - monitor
- traefik
- docker-socket-proxy
ports:
- 2375:2375
labels:
- "wud.watch=true"
+28
View File
@@ -0,0 +1,28 @@
services:
error-pages:
profiles: ["core","all","error-pages", "traefik"]
image: tarampampam/error-pages:latest
restart: always
container_name: error-pages
read_only: true
environment:
TEMPLATE_NAME: ${ERROR_PAGES_TEMPLATE_NAME}
networks:
# - reverse_proxy
- traefik
hostname: error-pages
labels:
- "traefik.enable=true"
# use as "fallback" for any NON-registered services (with priority below normal)
- "traefik.http.routers.error-pages-router.rule=HostRegexp(`{host:.+}`)"
# should say that all of your services work on https
- "traefik.http.routers.error-pages-router.entrypoints=web"
- "traefik.http.routers.error-pages-router.middlewares=error-pages-middleware"
# "errors" middleware settings
- "traefik.http.middlewares.error-pages-middleware.errors.status=400,402-502,504-599"
- "traefik.http.middlewares.error-pages-middleware.errors.service=error-pages-service"
- "traefik.http.middlewares.error-pages-middleware.errors.query=/{status}.html"
# define service properties
- "traefik.http.services.error-pages-service.loadbalancer.server.port=8080"
- "io.portainer.accesscontrol.public"
- "wud.watch=true"
+17
View File
@@ -0,0 +1,17 @@
FROM debian:latest
#RUN groupadd -g 1000 appuser || true && \
# useradd -m -u 1000 -g 1000 -s /bin/bash appuser
#RUN groupadd -g 999 docker || true && usermod -aG docker appuser
WORKDIR /app
COPY exporter.py .
RUN mkdir -p /data
RUN apt update && apt install python3 pip -y
RUN pip install --no-cache-dir docker prometheus_client requests pyyaml --break-system-packages
#USER appuser
CMD ["bash"]
+63
View File
@@ -0,0 +1,63 @@
services:
update-test:
image: nginx:1.28.1
container_name: update-test
profiles: ["test"]
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"] # returns 0 if Nginx is up
interval: 5s
timeout: 2s
retries: 3
start_period: 2s
docker-update-exporter-test:
profiles: ["test"]
build:
context: ${PROJECT_ROOT}/core/test
container_name: docker-update-exporter-test
stdin_open: true
tty: true
# depends_on:
# - docker-socket-proxy
environment:
DOCKER_HOST: tcp://docker-socket-proxy:2375
volumes:
- ${PROJECT_ROOT}/monitoring/docker-exporter/data:/data:rw
# - ${PROJECT_ROOT}/services-up.sh:/app/services-up.sh:ro
- ${PROJECT_ROOT}:/compose
- ${PROJECT_ROOT}/default-environment.env:/compose/default-environment.env:ro
- ${PROJECT_ROOT}/default-network.yml:/compose/default-network.yml:ro
- ${PROJECT_ROOT}/core/docker-compose.yml:/compose/core/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/prometheus/docker-compose.yml:/compose/monitoring/prometheus/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/gotify/docker-compose.yml:/compose/monitoring/gotify/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/grafana/docker-compose.yml:/compose/monitoring/grafana/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/portainer/docker-compose.yml:/compose/monitoring/portainer/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/uptime-kuma/docker-compose.yml:/compose/monitoring/uptime-kuma/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/gitea/docker-compose.yml:/compose/apps/gitea/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/gramps/docker-compose.yml:/compose/apps/gramps/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/nextcloud/docker-compose.yml:/compose/apps/nextcloud/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/passbolt/docker-compose.yml:/compose/apps/passbolt/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/searxng/docker-compose.yml:/compose/apps/searxng/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/shift-recorder/docker-compose.yml:/compose/apps/shift-recorder/docker-compose.yml:ro
- ${PROJECT_ROOT}/apps/stockfill/docker-compose.yml:/compose/apps/stockfill/docker-compose.yml:ro
- ${PROJECT_ROOT}/monitoring/node-red/docker-compose.yml:/compose/monitoring/node-red/docker-compose.yml:ro
- ${PROJECT_ROOT}/core/test/docker-compose.yml:/compose/core/test/docker-compose.yml:ro
# ports:
# - "9105:9105"
restart: unless-stopped
networks:
# - edge
- monitor
# healthcheck:
# test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9105/metrics')"]
# interval: 30s
# timeout: 5s
# retries: 3
# start_period: 10s
+325
View File
@@ -0,0 +1,325 @@
#!/usr/bin/env python3
import os
import re
import time
import json
import docker
import requests
import yaml
from prometheus_client import Gauge, start_http_server
# --- Config ---
EXPORTER_PORT = 9105
CHECK_INTERVAL = 60
CACHE_TTL = 6 * 3600
SERVICES_UP_SCRIPT = "/compose/services-up.sh"
CACHE_FILE = "/data/remote_digest_cache.json"
client = docker.from_env()
# --- Metrics ---
CONTAINER_UPDATE = Gauge(
"docker_container_update_available",
"1 if container image is out of date (compose drift or registry), 0 otherwise",
["container", "compose_image", "running_image", "com_docker_compose_project"]
)
LAST_CHECK = Gauge(
"docker_image_update_last_check_timestamp",
"Last time the update check ran (unix timestamp)"
)
# --- Persistent Cache ---
def load_cache():
if not os.path.exists(CACHE_FILE):
return {}
try:
with open(CACHE_FILE, "r") as f:
return json.load(f)
except Exception as e:
print(f"[cache] Failed to load cache: {e}")
return {}
def save_cache():
try:
os.makedirs(os.path.dirname(CACHE_FILE), exist_ok=True)
with open(CACHE_FILE, "w") as f:
json.dump(REMOTE_DIGEST_CACHE, f)
except Exception as e:
print(f"[cache] Failed to save cache: {e}")
REMOTE_DIGEST_CACHE = load_cache()
# --- Helpers ---
def get_project_prefix_from_script(script_path):
project_prefix = "core-" # fallback
if not os.path.exists(script_path):
return project_prefix
with open(script_path, "r") as f:
for line in f:
line = line.strip()
m = re.match(r'PROJECT\s*=\s*["\']?([^"\']+)["\']?', line)
if m:
project_prefix = m.group(1) + "-"
break
return project_prefix
def get_local_digest(image_name):
try:
img = client.images.get(image_name)
digests = img.attrs.get("RepoDigests", [])
if digests:
return digests[0].split("@")[1]
except Exception as e:
print(f"[local_digest] Error for {image_name}: {e}")
return None
def get_remote_digest(image_name):
now = time.time()
original = image_name
# Use cached value if still valid
if original in REMOTE_DIGEST_CACHE:
digest, ts = REMOTE_DIGEST_CACHE[original]
if now - ts < CACHE_TTL:
return digest
try:
if "/" not in image_name:
registry = "docker.io"
repo = "library/" + image_name
else:
parts = image_name.split("/")
if "." in parts[0] or ":" in parts[0]:
registry = parts[0]
repo = "/".join(parts[1:])
else:
registry = "docker.io"
repo = image_name
if ":" in repo:
repo, tag = repo.rsplit(":", 1)
else:
tag = "latest"
token = None
manifest_url = None
if registry in ["docker.io", "registry-1.docker.io"]:
token_res = requests.get(
"https://auth.docker.io/token",
params={
"service": "registry.docker.io",
"scope": f"repository:{repo}:pull"
},
timeout=10
)
token = token_res.json().get("token")
manifest_url = f"https://registry-1.docker.io/v2/{repo}/manifests/{tag}"
elif registry == "ghcr.io":
token_res = requests.get(
"https://ghcr.io/token",
params={"scope": f"repository:{repo}:pull"},
timeout=10
)
token = token_res.json().get("token")
manifest_url = f"https://ghcr.io/v2/{repo}/manifests/{tag}"
else:
return None
res = requests.get(
manifest_url,
headers={
"Authorization": f"Bearer {token}" if token else "",
"Accept": "application/vnd.docker.distribution.manifest.v2+json"
},
timeout=10
)
if res.status_code == 200:
digest = res.headers.get("Docker-Content-Digest")
# Save to persistent cache
REMOTE_DIGEST_CACHE[original] = (digest, now)
save_cache()
return digest
except Exception as e:
print(f"[remote_digest] Error for {image_name}: {e}")
return None
def get_compose_files_from_script(script_path):
files = []
if not os.path.exists(script_path):
print(f"[compose_files] Script not found: {script_path}")
return files
base_dir = os.path.dirname(script_path)
with open(script_path, "r") as f:
content = f.read()
match = re.search(r'FILES\s*=\s*\((.*?)\)', content, re.DOTALL)
if match:
lines = match.group(1).splitlines()
for line in lines:
line = line.strip()
if line.startswith("-f"):
rel_path = line[2:].strip()
if rel_path:
full_path = os.path.join(base_dir, rel_path)
full_path = os.path.normpath(full_path)
print(f"[compose_files] {rel_path} -> {full_path}")
files.append(full_path)
return files
def parse_compose_files(compose_files):
"""Return mapping service_name -> (expected image, is_built)"""
service_to_image = {}
for f in compose_files:
if not os.path.exists(f):
continue
try:
with open(f, "r") as stream:
data = yaml.safe_load(stream)
services = data.get("services", {})
for service_name, service_def in services.items():
image = service_def.get("image")
is_built = False
if not image:
build_ctx = service_def.get("build")
if isinstance(build_ctx, dict):
context_path = build_ctx.get("context", ".")
dockerfile_path = os.path.join(
context_path,
build_ctx.get("dockerfile", "Dockerfile")
)
elif isinstance(build_ctx, str):
context_path = build_ctx
dockerfile_path = os.path.join(context_path, "Dockerfile")
else:
dockerfile_path = None
if dockerfile_path and os.path.exists(dockerfile_path):
try:
with open(dockerfile_path, "r") as df:
for line in df:
line = line.strip()
if line.upper().startswith("LABEL") and "image=" in line:
m = re.search(
r'image=["\']?([^"\']+)["\']?',
line
)
if m:
image = m.group(1)
break
except Exception as e:
print(f"[dockerfile] Error reading {dockerfile_path}: {e}")
if not image:
image = f"{service_name}:latest"
is_built = True
service_to_image[service_name] = (image, is_built)
except Exception as e:
print(f"[compose_parse] Failed {f}: {e}")
return service_to_image
def check_containers():
CONTAINER_UPDATE.clear()
PROJECT_PREFIX = get_project_prefix_from_script(SERVICES_UP_SCRIPT)
compose_files = get_compose_files_from_script(SERVICES_UP_SCRIPT)
service_to_image = parse_compose_files(compose_files)
for container in client.containers.list():
project_label = container.labels.get("com.docker.compose.project")
if not project_label:
continue # skip non-compose containers
service_label = container.labels.get("com.docker.compose.service")
running_image = container.attrs["Config"]["Image"]
compose_image = None
is_built = False
if service_label and service_label in service_to_image:
compose_image, is_built = service_to_image[service_label]
if is_built:
compose_image_name, _, _ = compose_image.partition(":")
compose_image = f"{PROJECT_PREFIX}{compose_image_name}"
update_flag = 0
if is_built:
if running_image != compose_image:
update_flag = 1
else:
local_digest = get_local_digest(running_image)
remote_digest = get_remote_digest(service_to_image[service_label][0])
if local_digest and remote_digest and local_digest != remote_digest:
update_flag = 1
else:
if running_image != compose_image:
update_flag = 1
else:
local_digest = get_local_digest(running_image)
remote_digest = get_remote_digest(running_image)
if local_digest and remote_digest and local_digest != remote_digest:
update_flag = 1
CONTAINER_UPDATE.labels(
container=container.name,
compose_image=compose_image if compose_image else "unknown",
running_image=running_image,
com_docker_compose_project=project_label
).set(update_flag)
print(
f"{container.name} | "
f"running={running_image} | "
f"compose={compose_image} | "
f"update={update_flag}"
)
LAST_CHECK.set(time.time())
if __name__ == "__main__":
start_http_server(EXPORTER_PORT)
print(f"Docker update exporter running on :{EXPORTER_PORT}")
while True:
try:
check_containers()
except Exception as e:
print(f"[main] Error: {e}")
time.sleep(CHECK_INTERVAL)
Loaded 100 of 558 files, more files were not shown because too many files have changed in this diff. Show more