HI @Datico I created the library CFConfig out of this conversation. It is a module for the CommandBox CLI which allows
- export of CF config to JSON
- import of JSON to CF server
- JSON files support all possible system setting expansions in the form of
${FOO}
so JSON files are safe to commit and can be re-used across environments - Comprehensive diffing settings between servers/JSON and export these results to HTML/PDF
- support for both Adobe ColdFusion and Lucee Server in the same JSON format
- Get and Set individual settings
- A suite of CLI commands for manually creating datasources, event gateways, mail servers, caches, etc
- Ability to import or export only parts of a JSON file by key name
- Ability to overwrite or “append” config on top of existing config (such as adding DSN’s without removing existing)
- Ability to export settings to JSON with automatic replacement of sensitive values with
${DB_HOST}
style placeholders to fully automate extraction of settings
CFConfig can be used to manage any CF server’s config, even if it is installed on Tomcat, etc. CFConfig, being a CommandBox module, also has a deep integration to CommandBox servers such that simply running server start
will do the following out of the box:
- find and import
.cfconfig.json
,.cfconfig-web.json
and/or.cfconfig-server.json
files automatically by convention - Will import files not in the convention location or having the default name as specified in
server.json
- Is capable of handling a single web context or as many web contexts as you like for ModCFML support
- FULL env var support for every possible Lucee setting which can be used to add a datasource, override just a hostname in a single Datasource definition or default the Lucee admin password on the fly without any JSON (or in addition to) which works great in Docker
Furthermore, the CFConfig (and dotenv) modules are installed standard in the ortussolutions/commandbox
Docker Image so you can fully load in your CF config by convention right as the server starts up and it’s ready to go with no need for web-admin access.
Here are the docs for CFConfig