frep是一个根据模版文件生成相应的配置文件功能,相关数据可以从环境变量,json,yaml,toml文件中获取。
比如根据nginx.conf.in模版文件和动态数据data.json,动态生成nginx.conf
frep nginx.conf.in --load data.json具体帮助参考:
NAME: frep-GeneratefileusingtemplateUSAGE: frep[options]input-file[:output-file]...VERSION: 1.2.0-50AUTHORS: GuoqiangChenOPTIONS: -ename=value,--envname=value setvariablename=value,canbepassedmultipletimes --jsonjsonstring loadvariablesfromjsonobjectstring --loadfile loadvariablesfromjson/yaml/tomlfile --overwrite overwriteifdestinationfileexists --dryrun justoutputresulttoconsoleinsteadoffile --delimsvalue templatetagdelimiters(default:{{:}}) --help printthisusage --version printversioninformationEXAMPLES: frepnginx.conf.in-ewebroot=/usr/share/nginx/html-eport=8080 frepnginx.conf.in:/etc/nginx.conf-ewebroot=/usr/share/nginx/html-eport=8080 frepnginx.conf.in--json'{"webroot":"/usr/share/nginx/html","port":8080}' frepnginx.conf.in--loadconfig.json--overwrite
评论