From e10e1e90b447463b64674ac11013617ee60ae00b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 11 Aug 2026 03:51:02 +0000 Subject: [PATCH] Fix invalid docker-compose.yml when Beszel is installed with local Caddy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Confirmed live: "networks.beszel-agent additional properties ... not allowed" — the root-level networks: block (_CADDY_NET_SECTION) was placed between the two services instead of after both. Since it sits at 0 indentation, YAML parsed the following beszel-agent: line as a continuation of the networks: mapping instead of a new services: entry, so the whole beszel-agent service definition got swallowed as if it were a (invalid) child of networks.caddy_net. gatus.sh's identical _CADDY_NET_BLOCK/_CADDY_NET_SECTION pattern never hit this because it only ever has one service, so the same placement is always the last content in the file there. Moved _CADDY_NET_SECTION (the root-level networks: definition) to after both services; _CADDY_NET_BLOCK (the per-service "join caddy_net" snippet) stays right after the hub's own volumes, where it correctly nests under the beszel: service only. Verified by regenerating the compose file with local Caddy present and parsing it with PyYAML: services.beszel and services.beszel-agent are now proper siblings, beszel-agent keeps its image/environment/volumes keys, beszel's own networks: is scoped to just that service, and the root networks: definition is separate and correctly placed. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01H4k6J1qXXyYxhGEgnJaMvn --- services/beszel.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/beszel.sh b/services/beszel.sh index 9a02041..242f4cd 100644 --- a/services/beszel.sh +++ b/services/beszel.sh @@ -259,7 +259,7 @@ services: volumes: - ./beszel_data:/beszel_data - ./beszel_socket:/beszel_socket -${_CADDY_NET_BLOCK}${_CADDY_NET_SECTION} +${_CADDY_NET_BLOCK} beszel-agent: image: henrygd/beszel-agent:latest container_name: beszel-agent @@ -275,6 +275,7 @@ ${_CADDY_NET_BLOCK}${_CADDY_NET_SECTION} - ./beszel_agent_data:/var/lib/beszel-agent - ./beszel_socket:/beszel_socket - /var/run/docker.sock:/var/run/docker.sock:ro +${_CADDY_NET_SECTION} BESZEL_COMPOSE # APP_URL only matters for the hub's own generated links and origin