shizunge / endlessh-go

A golang implementation of endlessh exporting Prometheus metrics, visualized by a Grafana dashboard.
GNU General Public License v3.0
977 stars 31 forks source link

Add env vars to docker images #89

Open sudo-Tiz opened 9 months ago

sudo-Tiz commented 9 months ago

The usage of CLI arguments works well for binary usage but with docker images it would be better to propose environments variables. We could imagine something like: cli_args if not undefined else anv_agrs if not undefined else default

shizunge commented 9 months ago

For my education, is there a use case that can be only done via env, not cli argument?

sudo-Tiz commented 9 months ago

Well, this is a common practice to use environment variables with container orchestration tools. This way you can set the necessary environment variables once and reuse them across different instances or containers instead of passing CLI arguments every time. I admits this is not mandatory at all and a configuration file would be better (see #88 )

shizunge commented 9 months ago

Share Env is a legit use case. Let us keep this issue open