fix: document cbox-init Management API and fix env var inconsistencies#1
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
LARAVEL_OPTIMIZE_CONFIG/ROUTE/VIEWenv vars with actualLARAVEL_OPTIMIZE_ENABLEDLARAVEL_AUTO_OPTIMIZEin entrypointTest plan
LARAVEL_AUTO_OPTIMIZE=truemaps toLARAVEL_OPTIMIZE_ENABLEDat container startupCBOX_INIT_API_ENABLED=trueenables the Management API on port 9180