chore(compose): pass through distribution limit/TTL env vars (BUNYIP-42) #54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/bunyip-42-compose-distribution-tunables"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes BUNYIP-42. The distribution limits and cache TTLs are configurable in code but several were not passed through by the compose files, so dev could not exercise enforcement via .env (BUNYIP-35 needed a temporary override file) and operators could not tune them without editing compose.yml.
Change
Add the missing
VAR: ${VAR:-default}passthroughs to the api service in both compose files, following the existing OCI_PULLS_PER_USER_PER_DAY pattern. Defaults mirror crates/bunyip-domain/src/config.rs.Note: the issue's table had two stale defaults. Verified against the source: OCI_MANIFEST_CACHE_TTL_SECS is 300 (not 60) and OCI_TOKEN_TTL_SECS is 900 (not 300). The passthroughs use the real code defaults.
.env.example documents all of them grouped by purpose (size caps / usage limits / TTLs).
Verification
docker compose -f compose.yml configanddocker compose -f compose.dev.yml configboth render the seven vars with the code defaults, and an override (OCI_PULLS_PER_USER_PER_DAY=3) flows through to the rendered config. Config-only change; no Rust touched.🤖 Generated with Claude Code
The distribution rate/usage limits and cache TTLs are configurable in code (crates/bunyip-domain/src/config.rs) but the compose files did not pass several of them through, so dev could not exercise enforcement via .env (BUNYIP-35 needed a temporary override file) and operators could not tune them without editing compose.yml. Add the missing `VAR: ${VAR:-default}` passthroughs to the api service in both compose files, following the existing OCI_PULLS_PER_USER_PER_DAY pattern. Defaults mirror config.rs exactly (verified against the source; the issue's table had two wrong: OCI_MANIFEST_CACHE_TTL_SECS is 300 not 60, OCI_TOKEN_TTL_SECS is 900 not 300). - compose.dev.yml: adds all seven (DOWNLOAD_CONCURRENCY_PER_USER, DOWNLOAD_DAILY_LIMIT_PER_USER, FORGEJO_RELEASE_CACHE_TTL_SECS, OCI_CONCURRENT_MANIFESTS_PER_USER, OCI_PULLS_PER_USER_PER_DAY, OCI_MANIFEST_CACHE_TTL_SECS, OCI_TOKEN_TTL_SECS). - compose.yml: adds the five it was missing (it already passed OCI_PULLS_PER_USER_PER_DAY + DOWNLOAD_DAILY_LIMIT_PER_USER). - .env.example: documents all of them grouped by purpose. Verified: `docker compose config` on both files renders the seven vars with the code defaults, and an override (e.g. OCI_PULLS_PER_USER_PER_DAY=3) flows through. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: nrupard <natrsmith11@gmail.com>