Overriding ContentBox Settings
Last updated
Last updated
ContentBox allows you to override global site settings dynamically. This approach is great for container based deployments, but also for traditional overrides for testing or staging environments.
You can override any runtime setting for ContentBox via a configuration structure in your main ColdBox.cfc
configuration file. This will allow developers to override any runtime setting for any site.
All you need to do is create the a contentbox
structure in your configure()
or any tier method, with the name of the site (default
is the default site) and then any setting name-value pair.
You can also override any runtime ContentBox setting by passing them via Docker/Java Runtime variables.
Since these are string keys we can now use our fancy structures like the settings above, so you must adhere to our recognition pattern:
Here is an example on adding a custom media root:
This will allow especially Docker environments to override settings as environments or even provide secrets. More is coming, so stay tuned to our updates.