fix(caddy): add SNI connection_policy to layer4 TLS block and anchor redis.libnovel.cc cert
Some checks failed
CI / Backend (pull_request) Successful in 30s
CI / UI (pull_request) Successful in 46s
Release / Test backend (push) Successful in 32s
CI / Backend (push) Successful in 49s
CI / UI (push) Successful in 57s
Release / Check ui (push) Successful in 31s
Release / Docker / caddy (push) Successful in 1m19s
Release / Docker / runner (push) Failing after 1m11s
Release / Docker / ui (push) Successful in 2m1s
Release / Docker / backend (push) Successful in 5m1s
Release / Gitea Release (push) Has been skipped
Some checks failed
CI / Backend (pull_request) Successful in 30s
CI / UI (pull_request) Successful in 46s
Release / Test backend (push) Successful in 32s
CI / Backend (push) Successful in 49s
CI / UI (push) Successful in 57s
Release / Check ui (push) Successful in 31s
Release / Docker / caddy (push) Successful in 1m19s
Release / Docker / runner (push) Failing after 1m11s
Release / Docker / ui (push) Successful in 2m1s
Release / Docker / backend (push) Successful in 5m1s
Release / Gitea Release (push) Has been skipped
Without a connection_policy, Caddy resolved the TLS cert by the Docker
internal IP (172.18.0.5) instead of the hostname, causing TLS handshake
failures on :6380 (rediss:// from prod backend → homelab Redis / Asynq).
Changes:
- Caddyfile: add connection_policy { match { sni redis.libnovel.cc } } to
the layer4 :6380 tls handler so Caddy picks the correct cert
- Caddyfile: add redis.libnovel.cc virtual-host block (respond 404) to
force Caddy to obtain and cache a TLS cert for that hostname
- homelab/docker-compose.yml: add REDIS_ADDR, REDIS_PASSWORD,
LIBRETRANSLATE_URL, LIBRETRANSLATE_API_KEY, and
RUNNER_MAX_CONCURRENT_TRANSLATION to the runner service for parity with
homelab/runner/docker-compose.yml
This commit is contained in:
17
Caddyfile
17
Caddyfile
@@ -65,7 +65,13 @@
|
|||||||
:6380 {
|
:6380 {
|
||||||
route {
|
route {
|
||||||
tls {
|
tls {
|
||||||
proxy {
|
connection_policy {
|
||||||
|
match {
|
||||||
|
sni redis.libnovel.cc
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
proxy {
|
||||||
upstream {$HOMELAB_REDIS_ADDR:192.168.0.109:6379}
|
upstream {$HOMELAB_REDIS_ADDR:192.168.0.109:6379}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,3 +280,12 @@ search.libnovel.cc {
|
|||||||
reverse_proxy meilisearch:7700
|
reverse_proxy meilisearch:7700
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ── Redis TLS cert anchor ─────────────────────────────────────────────────────
|
||||||
|
# This virtual host exists solely so Caddy obtains and caches a TLS certificate
|
||||||
|
# for redis.libnovel.cc. The layer4 block above uses that cert to terminate TLS
|
||||||
|
# on :6380 (Asynq job-queue channel from prod → homelab Redis).
|
||||||
|
# The HTTP route itself just returns 404 — no real traffic expected here.
|
||||||
|
redis.libnovel.cc {
|
||||||
|
respond 404
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -58,6 +58,14 @@ services:
|
|||||||
VALKEY_ADDR: ""
|
VALKEY_ADDR: ""
|
||||||
GODEBUG: "preferIPv4=1"
|
GODEBUG: "preferIPv4=1"
|
||||||
|
|
||||||
|
# ── LibreTranslate (internal Docker network) ──────────────────────────
|
||||||
|
LIBRETRANSLATE_URL: "http://libretranslate:5000"
|
||||||
|
LIBRETRANSLATE_API_KEY: "${LIBRETRANSLATE_API_KEY}"
|
||||||
|
|
||||||
|
# ── Asynq / Redis ─────────────────────────────────────────────────────
|
||||||
|
REDIS_ADDR: "redis:6379"
|
||||||
|
REDIS_PASSWORD: "${REDIS_PASSWORD}"
|
||||||
|
|
||||||
KOKORO_URL: "http://kokoro-fastapi:8880"
|
KOKORO_URL: "http://kokoro-fastapi:8880"
|
||||||
KOKORO_VOICE: "${KOKORO_VOICE}"
|
KOKORO_VOICE: "${KOKORO_VOICE}"
|
||||||
|
|
||||||
@@ -67,6 +75,7 @@ services:
|
|||||||
RUNNER_POLL_INTERVAL: "${RUNNER_POLL_INTERVAL}"
|
RUNNER_POLL_INTERVAL: "${RUNNER_POLL_INTERVAL}"
|
||||||
RUNNER_MAX_CONCURRENT_SCRAPE: "${RUNNER_MAX_CONCURRENT_SCRAPE}"
|
RUNNER_MAX_CONCURRENT_SCRAPE: "${RUNNER_MAX_CONCURRENT_SCRAPE}"
|
||||||
RUNNER_MAX_CONCURRENT_AUDIO: "${RUNNER_MAX_CONCURRENT_AUDIO}"
|
RUNNER_MAX_CONCURRENT_AUDIO: "${RUNNER_MAX_CONCURRENT_AUDIO}"
|
||||||
|
RUNNER_MAX_CONCURRENT_TRANSLATION: "${RUNNER_MAX_CONCURRENT_TRANSLATION}"
|
||||||
RUNNER_TIMEOUT: "${RUNNER_TIMEOUT}"
|
RUNNER_TIMEOUT: "${RUNNER_TIMEOUT}"
|
||||||
RUNNER_METRICS_ADDR: "${RUNNER_METRICS_ADDR}"
|
RUNNER_METRICS_ADDR: "${RUNNER_METRICS_ADDR}"
|
||||||
RUNNER_SKIP_INITIAL_CATALOGUE_REFRESH: "true"
|
RUNNER_SKIP_INITIAL_CATALOGUE_REFRESH: "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user