feat(config): 支持通过环境变量或 VM 参数指定数据目录.

主要是为 Docker 镜像支持, 这样可以在镜像中指定数据目录, 方便设置持久卷或者文件映射.
This commit is contained in:
2022-02-26 12:00:16 +08:00
parent 737ac9a08a
commit b3c63e5abe
3 changed files with 57 additions and 17 deletions

View File

@ -17,6 +17,7 @@ private val launcher = Launcher()
fun main(args: Array<String>): Unit = runBlocking {
log.info { "ScalaBot 正在启动中..." }
log.info { "数据目录: ${AppPaths.DATA_ROOT}" }
log.debug { "启动参数: ${args.joinToString(prefix = "[", postfix = "]")}" }
initialFiles()
if (Const.config.metrics.enable) {