From 65debb6e444a02b073bfefa9e8239be0262d9214 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 19 Jul 2026 12:21:40 +0200 Subject: [PATCH] fix(config): default service hosts to docker container names The homelab is retiring *.schweitz.internal and will rebind host ports to loopback; container-to-container traffic must use container names on docker-dataplane. - SEARXNG_HOST: http://localhost:8087 -> http://searxng:8080 (SearXNG's internal port is 8080; 8087 was the host-published port) - LIBRARY_DESK_HOST: http://localhost:8089 -> http://library-desk:8089 - CORE_API_HOST: http://localhost:8090 -> http://core-api:8083 (8090 is the Scheduler's host port; Core-API serves 8083 internally, confirmed by the housekeeper client and test suite hitting :8083) - scripts/test_housekeeper.sh: reach Core-API via localhost:8083 instead of the LAN IP, which will refuse after loopback rebinding Local development against host-published ports keeps working via .env overrides (.env.example unchanged; localhost stays valid on the host). Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 4 ++++ scripts/test_housekeeper.sh | 2 +- src/core/config.py | 12 ++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e37bd64..1717082 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- **Container-name network defaults** - `SEARXNG_HOST`, `LIBRARY_DESK_HOST`, and `CORE_API_HOST` now default to docker container names on the docker-dataplane network (`http://searxng:8080`, `http://library-desk:8089`, `http://core-api:8083`) instead of host `localhost` ports, ahead of the loopback port rebinding; this also fixes `CORE_API_HOST` pointing at port 8090 (the Scheduler's host port) rather than Core-API's 8083. `scripts/test_housekeeper.sh` now reaches Core-API via `localhost:8083` instead of the LAN IP. Local development against host-published ports still works via `.env` overrides + ## [2.4.0] - 2026-07-14 ### Removed diff --git a/scripts/test_housekeeper.sh b/scripts/test_housekeeper.sh index 1efcb4c..38bb739 100755 --- a/scripts/test_housekeeper.sh +++ b/scripts/test_housekeeper.sh @@ -3,7 +3,7 @@ # Verifies room groups are controlled by checking actual state changes API_URL="http://localhost:8777/v1/chat/completions" -CORE_API="http://192.168.86.149:8083" +CORE_API="http://localhost:8083" RESULTS_FILE="/tmp/housekeeper_test_results.txt" GREEN='\033[0;32m' diff --git a/src/core/config.py b/src/core/config.py index 3ce16e6..cfd0a40 100644 --- a/src/core/config.py +++ b/src/core/config.py @@ -110,8 +110,8 @@ class Config(BaseSettings): # SearXNG Configuration SEARXNG_HOST: HttpUrl = Field( - default="http://localhost:8087", - description="SearXNG server URL" + default="http://searxng:8080", + description="SearXNG server URL (container name; internal port 8080)" ) SEARXNG_TIMEOUT: int = Field( default=30, @@ -138,8 +138,8 @@ class Config(BaseSettings): description="Total time budget for a librarian delegation in seconds" ) LIBRARY_DESK_HOST: HttpUrl = Field( - default="http://localhost:8089", - description="Library-Desk API URL" + default="http://library-desk:8089", + description="Library-Desk API URL (container name; internal port 8089)" ) LIBRARY_DESK_API_KEY: str = Field( default="", @@ -152,8 +152,8 @@ class Config(BaseSettings): # Core-API Configuration (The Housekeeper backend) CORE_API_HOST: HttpUrl = Field( - default="http://localhost:8090", - description="Core-API URL for Home Assistant integration" + default="http://core-api:8083", + description="Core-API URL for Home Assistant integration (container name; internal port 8083)" ) CORE_API_KEY: str = Field( default="",