chore(compose): pass through distribution limit/TTL env vars (BUNYIP-42) #54

Merged
nrupard merged 1 commit from chore/bunyip-42-compose-distribution-tunables into main 2026-06-03 17:18:07 +02:00
Owner

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.

Variable Default compose.dev.yml compose.yml
OCI_PULLS_PER_USER_PER_DAY 50 added already present
DOWNLOAD_DAILY_LIMIT_PER_USER 50 added already present
DOWNLOAD_CONCURRENCY_PER_USER 2 added added
OCI_CONCURRENT_MANIFESTS_PER_USER 2 added added
OCI_TOKEN_TTL_SECS 900 added added
FORGEJO_RELEASE_CACHE_TTL_SECS 300 added added
OCI_MANIFEST_CACHE_TTL_SECS 300 added added

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 config and docker compose -f compose.dev.yml config both 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

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. | Variable | Default | compose.dev.yml | compose.yml | |----------|---------|-----------------|-------------| | OCI_PULLS_PER_USER_PER_DAY | 50 | added | already present | | DOWNLOAD_DAILY_LIMIT_PER_USER | 50 | added | already present | | DOWNLOAD_CONCURRENCY_PER_USER | 2 | added | added | | OCI_CONCURRENT_MANIFESTS_PER_USER | 2 | added | added | | OCI_TOKEN_TTL_SECS | 900 | added | added | | FORGEJO_RELEASE_CACHE_TTL_SECS | 300 | added | added | | OCI_MANIFEST_CACHE_TTL_SECS | 300 | added | added | 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 config` and `docker compose -f compose.dev.yml config` both 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](https://claude.com/claude-code)
chore(compose): pass through distribution limit/TTL env vars (BUNYIP-42)
All checks were successful
Check / fmt / clippy / build / test (pull_request) Successful in 1m10s
Create release / Create release from merged PR (pull_request) Has been skipped
52a6a30cf5
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>
nrupard deleted branch chore/bunyip-42-compose-distribution-tunables 2026-06-03 17:18:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/bunyip!54
No description provided.