refactor: centralize port config + fix 8082 conflict

- Add EMBED_URL, OLLAMA_URL, LLM_HEALTH_URL to config.rs
- Fix health.rs hardcoded ports → config references
- Fix sync_db.rs Ollama URL → config::OLLAMA_URL
- Create config/port_registry.tsv (single source of truth for ports)
- Remove Caddy 8082 proxy block (port belongs to LLM)
- Fix .env LLM_URL: localhost → 127.0.0.1 (avoid IPv6 Caddy conflict)
This commit is contained in:
M5Max128
2026-05-23 02:54:34 +08:00
parent a008bb865b
commit dddb5d4cbd
5 changed files with 43 additions and 12 deletions

View File

@@ -375,9 +375,9 @@ async fn health_detailed(State(state): State<AppState>) -> Json<DetailedHealthRe
.output()
.map(|o| o.status.success())
.unwrap_or(false),
embedding_server: check_http("http://127.0.0.1:11436/health").await,
embedding_server: check_http(&format!("{}/health", config::EMBED_URL.as_str())).await,
gdino_api: check_http("http://127.0.0.1:8080/health").await,
llm: check_http("http://127.0.0.1:8082/health").await,
llm: check_http(config::LLM_HEALTH_URL.as_str()).await,
rsync: check_rsync().await,
watcher_running: check_process_running("watcher"),
worker_running: check_process_running("worker"),