CFConfig 完美地满足了我的需求。我将@AndreasRu 的答案标记为已接受以向我介绍该工具!我只是在这个回复中添加了一些额外的细节以供后代使用。
- 安装 CommandBox作为部署脚本的一部分
- 安装 CFConfig作为部署脚本的一部分
- 使用 CFConfig 从现有框中导出 config.json 文件,该文件将与新部署共享设置。将此 json 文件存储在源代码控制中,用于每个框的类型/环境。
- 使用 CFConfig 将 config.json 作为部署脚本的一部分导入
这是一个简单的例子,说明它在 debian 上的样子
# Installs CommandBox
curl -fsSl https://downloads.ortussolutions.com/debs/gpg | apt-key add -
echo "deb https://downloads.ortussolutions.com/debs/noarch /" | tee -a /etc/apt/sources.list.d/commandbox.list
apt-get update && apt-get install apt-transport-https commandbox
# Installs CFConfig module
box install commandbox-cfconfig
# Import config settings
box cfconfig import from=/<path-to-config>/config.json to=/opt/ColdFusion/cfusion/ toFormat=adobe@11.0.19