Move the rowing photo Claude call to the Python service
POST /rowing in the Go backend no longer calls the Anthropic SDK. It keeps the admin gate, EXIF date, duplicate check, sanity bounds and insert, and sends the image to a new internal Python route, POST /internal/rowing/read, which makes the Claude call and returns the three numbers it read. The route spends a paid call and has no auth of its own, so nginx 404s /py/internal/ and the route refuses anything carrying the proxy headers nginx adds. The python container now receives CLAUDE_API_KEY. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+4
-2
@@ -10,8 +10,8 @@
|
||||
# variables inside that container. nginx, backend, db, icecast2,
|
||||
# certbot and gitea all do this.
|
||||
# The `python` service deliberately does neither wholesale — it uses an
|
||||
# explicit `environment:` allow-list of three variables, so it never sees the
|
||||
# database password or any API key.
|
||||
# explicit `environment:` allow-list, so it never sees the database password
|
||||
# or any API key other than the two it uses (TFL_APP_KEY, CLAUDE_API_KEY).
|
||||
#
|
||||
# HOW TO USE
|
||||
# cp .env.example .env then fill in every value.
|
||||
@@ -154,6 +154,8 @@ DOMAIN=
|
||||
EMAIL=
|
||||
|
||||
# --- Third-party API keys (backend) ------------------------------------------
|
||||
# CLAUDE_API_KEY is also passed to the python service, which makes the Claude
|
||||
# call for the rowing photo reader; the backend uses it for the email pipeline.
|
||||
CLAUDE_API_KEY=
|
||||
STEAM_API_KEY=
|
||||
STEAM_ID=
|
||||
|
||||
Reference in New Issue
Block a user