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