From bd5545b614699c2d9b20fc9a0e7ee91f3db9a38f Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 9 Sep 2025 11:59:11 +0000 Subject: [PATCH] fix: only set smtp secret when mailer is configured This fixes a bug where Vikunja would not start because the smtp secret was not set. It would show nothing in the logs but `docker inspect` on the host yields ``` "unable to get config from config store: failed to expand templated config cghsr0po6tijn4wuah8zulg48: template: expansion:9:15: executing \"expansion\" at : error calling secret: secret target smtp_password not found", ``` This change fixes that by checking if the mailer is enabled. --- config.yml.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.yml.tmpl b/config.yml.tmpl index e527ea5..67b6b9a 100644 --- a/config.yml.tmpl +++ b/config.yml.tmpl @@ -5,8 +5,10 @@ service: JWTSecret: {{ secret "jwt_secret" }} database: password: "{{ secret "db_password" }}" +{{ if eq (env "VIKUNJA_MAILER_ENABLED") "true" }} mailer: password: {{ secret "smtp_password" }} +{{ end }} {{ if eq (env "OAUTH_ENABLED") "true" }} auth: openid: -- 2.49.0