fix(deploy): reuse blaaai Consul key so citti gets a Claude key

Prod container had no ANTHROPIC_API_KEY (refresh returned 0/0 instantly;
homepage showed only the 9 heuristic matches), so offers stayed German.
The template read citti/anthropic_api_key, a path never set. Fall back to
the existing blaaai Consul key via or(), reusing BlaaAi's key with no new
secret to provision.
This commit is contained in:
Henrik Jess Nielsen
2026-10-30 11:28:19 +01:00
parent f374088211
commit 06656ffd4f

View File

@@ -98,11 +98,13 @@ job "citti" {
} }
# Claude key for DA translation + AI offer matching (same account as # Claude key for DA translation + AI offer matching (same account as
# BlaaAi). keyOrDefault so a missing KV never blocks deploy — without it # BlaaAi). Use citti's own Consul key if set, else fall back to the
# offers simply stay German and the token heuristic handles matching. # existing blaaai/anthropic_api_key. `or` keeps it empty (not a deploy
# failure) if neither exists — offers then stay German with heuristic
# matching.
template { template {
data = <<EOT data = <<EOT
ANTHROPIC_API_KEY={{ keyOrDefault "citti/anthropic_api_key" "" }} ANTHROPIC_API_KEY={{ or (keyOrDefault "citti/anthropic_api_key" "") (keyOrDefault "blaaai/anthropic_api_key" "") }}
EOT EOT
destination = "secrets/app.env" destination = "secrets/app.env"
env = true env = true