Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top