Skip to content

fix: document cbox-init Management API and fix env var inconsistencies#1

Merged
sylvesterdamgaard merged 3 commits into
mainfrom
doc/cbox-init-api-config
Apr 17, 2026
Merged

fix: document cbox-init Management API and fix env var inconsistencies#1
sylvesterdamgaard merged 3 commits into
mainfrom
doc/cbox-init-api-config

Conversation

@sylvesterdamgaard
Copy link
Copy Markdown
Contributor

Summary

  • Add complete Management API documentation (enable, port, auth token, docker-compose examples)
  • Fix incorrect API port references (8080 → 9180) across all docs
  • Replace non-existent LARAVEL_OPTIMIZE_CONFIG/ROUTE/VIEW env vars with actual LARAVEL_OPTIMIZE_ENABLED
  • Fix changelog listing wrong new env var names
  • Add missing backward compat mapping for LARAVEL_AUTO_OPTIMIZE in entrypoint

Test plan

  • Verify LARAVEL_AUTO_OPTIMIZE=true maps to LARAVEL_OPTIMIZE_ENABLED at container startup
  • Verify CBOX_INIT_API_ENABLED=true enables the Management API on port 9180
  • Review all doc examples for correctness

Add complete Management API documentation with env vars
(CBOX_INIT_API_ENABLED, CBOX_INIT_API_PORT, CBOX_INIT_API_AUTH_TOKEN),
docker-compose examples, and security guidance. Fix incorrect port 8080
references to 9180 across all docs.

Replace non-existent LARAVEL_OPTIMIZE_CONFIG/ROUTE/VIEW env vars with
the actual LARAVEL_OPTIMIZE_ENABLED. Fix changelog listing wrong new
names (LARAVEL_OPTIMIZE → LARAVEL_OPTIMIZE_ENABLED). Add missing
backward compat mapping for LARAVEL_AUTO_OPTIMIZE in entrypoint.
cbox-init reads api_enabled from YAML config only — the Go binary has
no env var binding for this field. CBOX_INIT_API_ENABLED/PORT/AUTH_TOKEN
were documented but never worked.

Replace env var examples with custom cbox-init.yaml mount approach,
which is the actual way to enable the API.
…, logging)

The cbox-init Go binary reads global settings (api_enabled, api_port,
metrics_enabled, etc.) from YAML only — no env var binding. Add
apply_cbox_init_env_overrides() in the entrypoint that copies the config
to /tmp and patches it with sed before starting cbox-init.

Supported env vars:
- CBOX_INIT_API_ENABLED, CBOX_INIT_API_PORT
- CBOX_INIT_METRICS_ENABLED, CBOX_INIT_METRICS_PORT
- CBOX_INIT_LOG_LEVEL, CBOX_INIT_LOG_FORMAT
- CBOX_INIT_SHUTDOWN_TIMEOUT

Restore env var examples in docs now that they actually work.
@sylvesterdamgaard sylvesterdamgaard merged commit b6d7190 into main Apr 17, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant