Frage

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.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top