This may sound nitpicking but I think there are some important nuances here.
The options that you provide are a mixture of HOW settings are being passed and WHAT settings are being passed.
With respect to HOW settings are being passed, two things apply:
- the way environment variables are currently being used
The DISCOURSE_WHATEVER
environment variables are currently used during the Docker build process to create entries in discourse.conf
which are available as GlobalSetting
or SiteSetting
from within Discourse. Discourse does not perceive these environment variables as such.
- the limitations of discourse.conf entries
Although GlobalSettings have the neat treat of being able to suppress and override SiteSettings, they also impose the limitation that in multisite enviroments they apply to all sites in the multisite.
These two combined mean that from within Discourse, SiteSetting is the most flexible. They can be actual SiteSettings, those can optionally come from discourse.conf
and those entries can come from DISCOURSE_
environment variables. IMO there is no actual choice there, SiteSetting is the most flexible and does not have disadvantages since they’re a functional superset of the others. You can use GlobalSettings instead if you want, and those could be filled using environment variables.
That implies that the only actual choice is whether to use automatic discovery of credentials or not. In my personal perception, automatic discovery is always very prone to errors, so I would prefer to have something explicit.
I.e. have a SiteSetting that somehow points to actual, concrete, credentials.