Make upload limit and Caddy settings configurable via env vars

- API: read the upload size limit from MAX_UPLOAD_MEGABYTES (default 15)
  and keep MAX_UPLOAD_BYTES as the byte value used by /predict
- Caddy: read the ACME email and request body limit from CADDY_EMAIL and
  CADDY_MAX_BODY (default 16MB, ~1 MB above the API limit)
- compose: pass the new variables to caddy_proxy and cnn_api

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-24 19:01:42 +02:00
co-authored by Claude Sonnet 5
parent 79db918564
commit 121d8a8ab4
3 changed files with 8 additions and 3 deletions
+5
View File
@@ -7,6 +7,10 @@ services:
- "80:80"
- "443:443"
restart: unless-stopped
environment:
- CADDY_EMAIL=marvin.krausser277@gmail.com
# Keep about 1 MB above the API's MAX_UPLOAD_MEGABYTES (multipart overhead).
- CADDY_MAX_BODY=16MB
volumes:
- ./caddy/data:/data/caddy
- ./caddy/config:/config/caddy
@@ -41,6 +45,7 @@ services:
- PREDICT_RATE_WINDOW=60
- REVIEW_RATE_LIMIT=5
- REVIEW_RATE_WINDOW=60
- MAX_UPLOAD_MEGABYTES=15
cpus: "5"
mem_limit: 3g