How to configure with a file instead of environment variables

My version of HedgeDoc is: 1.9.9

I want to configure my server via a config file instead of environment variables, but I cannot figure out how to do this. I read the docs here and mounted (a Helm template rendered) config.json file at /files/config.json in my container. I get error messages like this that I’m not sure how to debug:

Error: EISDIR: illegal operation on a directory, read '/hedgedoc'
    at readFileSyncUtf8 (node:internal/fs/read/utf8:20:3)
    at Object.readFileSync (node:fs:467:12)
    at Object.<anonymous> (/hedgedoc/app.js:47:13)
    at Module._compile (node:internal/modules/cjs/loader:1233:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

A few questions:

  1. Is this the correct approach? It is unclear whether I should only include the parameters I am overriding in the config.json file or if I have to include the entire thing (copying the default values).

  2. Do I have to fall back to using environment variables to inject the secrets (e.g. OAuth2 client ID and secret values)? Or is there a way to include another config file (which I would mount from a Kubernetes Secret)?

This sounds more like a general config issue. The error point to a if branch that os only used if you set useSSL. Is that intended?

That was it! I had confused the “protocol SSL” setting with the “use SSL” setting. Thanks for the help.