From a50b968b95be01212d24e4bb2116fa8657ce1b65 Mon Sep 17 00:00:00 2001 From: Admin Date: Wed, 25 Mar 2026 20:27:50 +0500 Subject: [PATCH] fix(infra): expose Meilisearch via search.libnovel.cc for homelab runner indexing - Add search.libnovel.cc Caddy vhost proxying to meilisearch:7700 - Pass MEILI_URL + MEILI_API_KEY from Doppler into homelab runner - Set GODEBUG=preferIPv4=1 to work around missing IPv6 route on homelab - Update comments to reflect runner now indexes books into Meilisearch --- Caddyfile | 10 ++++++++++ homelab/runner/docker-compose.yml | 10 +++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Caddyfile b/Caddyfile index 8d81b5a..9df85fb 100644 --- a/Caddyfile +++ b/Caddyfile @@ -30,6 +30,7 @@ # logs.libnovel.cc → dozzle:8080 (Docker log viewer) # uptime.libnovel.cc → uptime-kuma:3001 (uptime monitoring) # push.libnovel.cc → gotify:80 (push notifications) +# search.libnovel.cc → meilisearch:7700 (search index — homelab runner) # # Routes intentionally removed from direct-to-backend: # /api/scrape/* — SvelteKit has /api/scrape/ counterparts @@ -254,3 +255,12 @@ storage.libnovel.cc { import security_headers reverse_proxy minio:9000 } + +# ── Meilisearch: exposed for homelab runner search indexing ────────────────── +# The homelab runner connects here as MEILI_URL to index books after scraping. +# Protected by MEILI_MASTER_KEY bearer token — Meilisearch enforces auth on +# every request; Caddy just terminates TLS. +search.libnovel.cc { + import security_headers + reverse_proxy meilisearch:7700 +} diff --git a/homelab/runner/docker-compose.yml b/homelab/runner/docker-compose.yml index 60e6299..936e8eb 100644 --- a/homelab/runner/docker-compose.yml +++ b/homelab/runner/docker-compose.yml @@ -8,7 +8,8 @@ # - RUNNER_WORKER_ID=homelab-runner-1 (unique, avoids task claiming conflicts) # - MINIO_ENDPOINT/USE_SSL → storage.libnovel.cc over HTTPS # - POCKETBASE_URL → https://pb.libnovel.cc -# - MEILI_URL/VALKEY_ADDR → unset (not exposed publicly; not needed by runner) +# - MEILI_URL → https://search.libnovel.cc (Caddy-proxied) +# - VALKEY_ADDR → unset (not exposed publicly) # - RUNNER_SKIP_INITIAL_CATALOGUE_REFRESH=true services: @@ -30,9 +31,12 @@ services: MINIO_PUBLIC_ENDPOINT: "${MINIO_PUBLIC_ENDPOINT}" MINIO_PUBLIC_USE_SSL: "${MINIO_PUBLIC_USE_SSL}" - # ── Meilisearch / Valkey — not exposed, disabled ──────────────────────── - MEILI_URL: "" + # ── Meilisearch (via search.libnovel.cc Caddy proxy) ──────────────────── + MEILI_URL: "${MEILI_URL}" + MEILI_API_KEY: "${MEILI_API_KEY}" VALKEY_ADDR: "" + # Force IPv4 DNS resolution — homelab has no IPv6 route to search.libnovel.cc + GODEBUG: "preferIPv4=1" # ── Kokoro TTS ────────────────────────────────────────────────────────── KOKORO_URL: "${KOKORO_URL}"