TuiQiao / CBoard

An easy to use, self-service open BI reporting and BI dashboard platform.
https://tuiqiao.github.io/CBoardDoc/#/
Apache License 2.0
3.02k stars 1.17k forks source link

config.properties 配置文件能否通过外部注入,而不是直接放在 war 包里面? #713

Closed zexi closed 4 years ago

zexi commented 4 years ago

你好,我想把 cboard 作为容器运行在 kubernetes 集群里面,想通过 ConfigMap 的形式注入配置文件。但目前配置文件路径为 src/main/resources/config.properties,直接放到了 cboard.war 包里面。 有没有方式能够在 tomcat 启动的时候注入配置文件?比如把 config.properties 放到 /opt/apache-tomcat/conf/ 目录里面,然后 cboard 服务启动就会使用 /opt/apache-tomcat/conf/config.properties 配置了。

yzhang921 commented 4 years ago

没弄过,这中方案和这个项目本身没直接,建议Google搜搜,或许有人做过,持续关注,欢迎分享

godtrack commented 4 years ago

你可以在tomcat启动脚本里,加行代码把外部配置文件覆盖到对应得tomcat里呀