feat(docker): support custom parameters via OPENVIKING_CONSOLE_PARAMETERS in console entrypoint#1959
feat(docker): support custom parameters via OPENVIKING_CONSOLE_PARAMETERS in console entrypoint#1959kuronekosaiko wants to merge 1 commit into
Conversation
Allow passing extra arguments to openviking console via OPENVIKING_CONSOLE_PARAMETERS in entrypoint script.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
The suggestion to use Bash arrays is technically incompatible with this environment. The image is python:3.13-slim-trixie, where /bin/sh is Dash. Dash does not support arrays, read -a, or here-strings (<<<). Adopting the suggested code would cause the container to crash with a Syntax error. The current unquoted expansion is the standard POSIX-compliant way to handle multiple flags in a lightweight entrypoint. ✨ Assisted by Gemini |
Description
This PR introduces the
OPENVIKING_CONSOLE_PARAMETERSenvironment variable to the console entrypoint script.The Problem:
Currently, several guides (e.g.,
05-observability.md,11-oauth.md) and design docs (mcp-oauth2-1.md) explicitly state that users should start the console with the--write-enabledflag to perform administrative actions such as adding resources or managing tenants. However, there is currently no way to pass this flag when running OpenViking via Docker or Docker Compose, effectively locking containerized users into a "read-only" mode.The Solution:
By adding support for
OPENVIKING_CONSOLE_PARAMETERS, users can now inject--write-enabled(or any other future flags) into the bootstrap process via theirdocker-compose.ymlordocker runenvironment settings.Related Issue
Type of Change
Changes Made
CONSOLE_PARAMETERSvariable to the entrypoint script, defaulting to an empty string.${CONSOLE_PARAMETERS}to thepython -m openviking.console.bootstrapexecution command.Testing
OPENVIKING_CONSOLE_PARAMETERS="--write-enabled". Verified the console starts with write permissions and logs reflect the parameter.Checklist
Additional Notes