Pergunta

I built a universal tarball using sbt-native-packager. How do I load configuration files like c3p0 and application.conf from /etc/myapp or anyother custom location when I start the app.

I don't want the config files to be part of the distribution tarball itself.

Foi útil?

Solução

I believe you can use typesafe config's "include" feature to grab from a direct location.

See https://github.com/typesafehub/config#features-of-hocon

That said, this would require you to create different configurations based on where you're installing, if you wanted a global file as the config file.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top