sukso96100/authbook

Docker container does not start

Closed this issue · 6 comments

I just tried to start the authbook docker container.
Unfortunately I don't have enough knowledge to interpret how to solve the problem.
I think it is clear that the problem is related to the variable: ${"AUTHBOOK SMTP_PW"}
Does anyone have any ideas?
When I start it, I get the following error message:

Exception in thread "main" com.typesafe.config.ConfigException$UnresolvedSubstitution: application.conf @ file:/app/resources/application.conf: 45: Could not resolve substitution to a value: ${"AUTHBOOK SMTP_PW"} at com.typesafe.config.impl.ConfigReference.resolveSubstitutions(ConfigReference.java:108) at com.typesafe.config.impl.ResolveContext.realResolve(ResolveContext.java:179) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:142) at com.typesafe.config.impl.ConfigDelayedMerge.resolveSubstitutions(ConfigDelayedMerge.java:132) at com.typesafe.config.impl.ConfigDelayedMerge.resolveSubstitutions(ConfigDelayedMerge.java:59) at com.typesafe.config.impl.ResolveContext.realResolve(ResolveContext.java:179) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:142) at com.typesafe.config.impl.SimpleConfigObject$ResolveModifier.modifyChildMayThrow(SimpleConfigObject.java:379) at com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:312) at com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:398) at com.typesafe.config.impl.ResolveContext.realResolve(ResolveContext.java:179) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:142) at com.typesafe.config.impl.SimpleConfigObject$ResolveModifier.modifyChildMayThrow(SimpleConfigObject.java:379) at com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:312) at com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:398) at com.typesafe.config.impl.ResolveContext.realResolve(ResolveContext.java:179) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:142) at com.typesafe.config.impl.SimpleConfigObject$ResolveModifier.modifyChildMayThrow(SimpleConfigObject.java:379) at com.typesafe.config.impl.SimpleConfigObject.modifyMayThrow(SimpleConfigObject.java:312) at com.typesafe.config.impl.SimpleConfigObject.resolveSubstitutions(SimpleConfigObject.java:398) at com.typesafe.config.impl.ResolveContext.realResolve(ResolveContext.java:179) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:142) at com.typesafe.config.impl.ResolveContext.resolve(ResolveContext.java:231) at com.typesafe.config.impl.SimpleConfig.resolveWith(SimpleConfig.java:74) at com.typesafe.config.impl.SimpleConfig.resolve(SimpleConfig.java:64) at com.typesafe.config.impl.SimpleConfig.resolve(SimpleConfig.java:37) at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:214) at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:182) at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:259) at com.typesafe.config.ConfigFactory$1.call(ConfigFactory.java:256) at com.typesafe.config.impl.ConfigImpl$LoaderCache.getOrElseUpdate(ConfigImpl.java:65) at com.typesafe.config.impl.ConfigImpl.computeCachedConfig(ConfigImpl.java:92) at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:256) at com.typesafe.config.ConfigFactory.load(ConfigFactory.java:232) at io.ktor.server.engine.CommandLineKt.commandLineEnvironment(CommandLine.kt:27) at io.ktor.server.netty.EngineMain.main(EngineMain.kt:16)

Have you configured backend/resources/application.conf or setup environment variables defined in this file?

Can i set up the AUTHBOOK_SMTP_USERNAME
and
AUTHBOOK_SMTP_PW
and so on as Docker environment variables?

Yes, use -e options to set environment variable when running new container. See docker run reference for details
https://docs.docker.com/engine/reference/run/#env-environment-variables

For SMTP(email outbound) server, you may use email sending services like sendgrid, mailgun.

Thank you, I will test that. So far I have simply mapped the configurations file into the container. And started it with this command:

docker run --name authbook -v /home/max/application.conf:/backend/resources/application.conf:ro -p 80:8080 -d sukso96100/authbook

If you don't have any question further, I'll close this issue.

That worked, thank you. The only thing I'm still a bit surprised about is that I don't have my server set as the default on the login page. And when I change it, it's gone again the next time I load the website.