Priority between configuration file and environment variable

JDreyer4 days ago

Dear everyone,

I have discovered that it is possible to configure the server via environment variable, which is great for credentials, etc. Does the environment variable configuration override the configuration file, or is the configuration used is merged? Which configuration source has the priority?

I have looked through the source code, but I have not found the answer to this point.

Best regards,

Jonathan Dreyer

Anton Tananaev4 days ago

Environment variables take precedence.

JDreyer3 days ago

Thanks for your quick reply. It is a proposition, but maybe it could be interesting to mention this point into the documentation of the configuration file (https://www.traccar.org/configuration-file/). Something like: It is important to note that it is possible to use environment variables instead of the configuration file, and these environment variables take precedence over the information in the configuration file.

Best regards,

Jonathan Dreyer

Anton Tananaev3 days ago

Updated the config doc. Thank you.