From 6ac1d155911fc1bcf90056762aa1b80210077fcb Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 19 Jul 2026 12:21:43 +0200 Subject: [PATCH] fix(config): use docker hostnames for tatlock and searxng defaults The homelab is retiring *.schweitz.internal and will rebind host ports to 127.0.0.1, so container-to-container traffic must use container names on the docker-dataplane network. Switch defaults from host IP:port to http://tatlock:8000 and http://searxng:8080 (SearXNG's internal port is 8080; 8087 is only the host-published port). Co-Authored-By: Claude Fable 5 --- webber-api/.env.example | 5 ++++- webber-api/CHANGELOG.md | 3 +++ webber-api/docs/architecture.md | 4 +++- webber-api/src/shared/config.py | 4 ++-- webber-api/tests/test_web_search.py | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/webber-api/.env.example b/webber-api/.env.example index 8258eb1..d9c0560 100644 --- a/webber-api/.env.example +++ b/webber-api/.env.example @@ -18,9 +18,12 @@ OLLAMA_AGENT_MODEL=mistral-nemo-large:latest OLLAMA_EMBED_MODEL=nomic-embed-text:latest # Auth - Tatlock integration (optional) -# TATLOCK_API_URL=http://192.168.86.149:8000 +# TATLOCK_API_URL=http://tatlock:8000 # INTERNAL_API_KEY=your-internal-key +# Web search - SearXNG (container name on docker-dataplane; internal port 8080) +# SEARXNG_URL=http://searxng:8080 + # Tool execution TOOL_TIMEOUT_SECONDS=120 SANDBOX_ENABLED=true diff --git a/webber-api/CHANGELOG.md b/webber-api/CHANGELOG.md index 5e4689e..47e864d 100644 --- a/webber-api/CHANGELOG.md +++ b/webber-api/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Default `TATLOCK_API_URL` and `SEARXNG_URL` now use docker container names (`http://tatlock:8000`, `http://searxng:8080`) instead of host IP:port, for container-to-container traffic on the docker-dataplane network + ## [1.0.0] - 2026-01-15 ### Added diff --git a/webber-api/docs/architecture.md b/webber-api/docs/architecture.md index 20eb662..b664d36 100644 --- a/webber-api/docs/architecture.md +++ b/webber-api/docs/architecture.md @@ -207,7 +207,9 @@ All settings via environment variables or `.env`: | OLLAMA_URL | http://192.168.86.149:11434 | Ollama API URL | | OLLAMA_AGENT_MODEL | mistral-nemo-large:latest | Agent reasoning model | | OLLAMA_EMBED_MODEL | nomic-embed-text:latest | Embedding model | -| TATLOCK_API_URL | http://192.168.86.149:8000 | Tatlock auth service | +| TATLOCK_API_URL | http://tatlock:8000 | Tatlock auth service | +| SEARXNG_URL | http://searxng:8080 | SearXNG web search instance | +| SEARXNG_TIMEOUT | 10 | SearXNG request timeout (seconds) | | TOOL_TIMEOUT_SECONDS | 120 | Tool execution timeout | | SANDBOX_ENABLED | true | Enable sandboxed execution | | ALLOWED_PATHS | [] | Paths accessible to tools | diff --git a/webber-api/src/shared/config.py b/webber-api/src/shared/config.py index 8f7ca1f..3e4abd6 100644 --- a/webber-api/src/shared/config.py +++ b/webber-api/src/shared/config.py @@ -68,11 +68,11 @@ class Settings(BaseSettings): ollama_embed_model: str = "nomic-embed-text:latest" # Auth - Tatlock integration - tatlock_api_url: str | None = "http://192.168.86.149:8000" + tatlock_api_url: str | None = "http://tatlock:8000" internal_api_key: str | None = None # Web search - SearXNG (use SEARXNG_URL env var to override) - searxng_url: str = "http://192.168.86.149:8087" + searxng_url: str = "http://searxng:8080" searxng_timeout: int = 10 # Tool execution diff --git a/webber-api/tests/test_web_search.py b/webber-api/tests/test_web_search.py index a52c392..38f8a67 100644 --- a/webber-api/tests/test_web_search.py +++ b/webber-api/tests/test_web_search.py @@ -12,7 +12,7 @@ class TestWebSearchTool: @pytest.fixture def tool(self): - return WebSearchTool(searxng_url="http://localhost:8087", timeout=5) + return WebSearchTool(searxng_url="http://searxng:8080", timeout=5) @pytest.fixture def mock_search_response(self):