Paths in application.conf

I’m trying to set up play for https, and have initiallly set up a pck12 key in my application as such:

## Server config
play.server.https {
	port = 9443
	keyStore.path = "/public/server.p12"
}

but my application can’t seem to find the path specified. How do I specify paths within my project?

Extra credit: Obviously, this seems like a bad idea for a permanent solution. How would I set up a keystore for use within a docker image?

Thanks

Hi @PeeDub. Here’s the logic for loading and interpreting that setting:

As you can see the path you provide is passed to new File. That means that if you’re setting /public/server.p12 it will be an absolute path. If you provide a relative path it will be relative to the root sbt project or the root of the production distribution.

For production configuration you might also want to look at: https://www.playframework.com/documentation/2.6.x/ProductionConfiguration

Thanks, removing the leading slash fixed that particular error. I was going off of other sections of the documentation that were using “/public” type paths.

Regarding deployment, I am aware of the production configuration docs. I’m wondering more about where people store their keys for a docker type solution.

Thanks again