Commit Graph

11 Commits

Author SHA1 Message Date
Henrik Jess Nielsen
c5e4a326e0 chore(deploy): prefer a dedicated API key over the shared OAuth token
The OAuth token shares one rate budget across everything on the subscription
(incl. interactive Claude Code sessions), so citti's translation is almost
always throttled while coding — hence the page staying German. Template now
emits ANTHROPIC_API_KEY from citti/anthropic_api_key when set (its own rate
budget, no contention), else the OAuth token. Only one var is written so an
empty key can't shadow the token.
2026-10-30 12:19:45 +01:00
Henrik Jess Nielsen
1dec3b7bd8 fix(offers): support Claude OAuth token (citti/claude_oauth_token)
The key was provisioned as an OAuth token, not an API key. Read it from
Consul into ANTHROPIC_AUTH_TOKEN (the SDK uses it as a Bearer credential)
and add the required anthropic-beta: oauth-2025-04-20 header on the
messages calls. Credential guards now accept a key or a token. The job no
longer sets ANTHROPIC_API_KEY, since even an empty value would shadow the
token.
2026-10-30 11:46:57 +01:00
Henrik Jess Nielsen
06656ffd4f 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.
2026-10-30 11:28:19 +01:00
Henrik Jess Nielsen
c0580fefbc chore(deploy): inject ANTHROPIC_API_KEY from Consul KV into citti job
Reads citti/anthropic_api_key via keyOrDefault so a missing key never
blocks deploy — set it in Consul (copy from blaaai/anthropic_api_key)
to enable Danish translation and AI offer matching.
2026-10-30 11:03:54 +01:00
Henrik Jess Nielsen
ba936424af fix(deploy): use SHA image tag instead of latest in Nomad
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 42s
Avoids stale image cache issues where Nomad re-uses the old :latest
layer. SHA is injected via nomad -var flag at deploy time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:27:57 +02:00
Henrik Jess Nielsen
17f39c9503 Switch to ephemeral_disk, no host_volume required
All checks were successful
Build and Deploy citti / build-and-deploy (push) Successful in 40s
sticky+migrate keeps data across restarts and job updates.
DATA_DIR points to NOMAD_ALLOC_DIR/data.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:09:44 +02:00
Henrik Jess Nielsen
ff01f4e120 Move Nomad placement to int node (auto-creates volumes)
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:08:04 +02:00
Henrik Jess Nielsen
e92bdaf44d Add autobox constraint to Nomad job
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:07:31 +02:00
Henrik Jess Nielsen
d7ab8e02a1 Fix Dockerfile static copy, dynamic port, health endpoint
Some checks failed
Build and Deploy citti / build-and-deploy (push) Has been cancelled
- Remove COPY static/ (runtime uploads live in DATA_DIR/uploads)
- Add /health endpoint
- Read PORT from env (NOMAD_PORT_http in production, 9756 local)
- citti.nomad: dynamic port, canary deploy, Consul/Traefik, health check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:04:29 +02:00
Henrik Jess Nielsen
77eed9aa50 Fix workflow: use debian-host runner and registry.i80.dk
Some checks failed
Build and Deploy citti / build-and-deploy (push) Failing after 5s
Match BlaaAi deployment pattern: debian-host runner, Harbor registry,
nomad CLI directly, NOMAD_ADDR=https://nomad.i80.dk:4646.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 01:00:04 +02:00
Henrik Jess Nielsen
1a3476c4d3 Add Flask shopping app with Nomad deployment
Some checks failed
deploy / deploy (push) Has been cancelled
Flask app serving the Citti shopping list with SQLite persistence,
per-category item addition, dynamic custom categories, photo upload,
and a post-trip price analysis page.

- Port 9756, DATA_DIR env var for persistent volume in Nomad
- Gitea Actions pipeline builds Docker image and deploys via Nomad API
- Makefile targets: run, install, build, push

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-06 00:54:07 +02:00