Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default host to empty string #75

Closed
timtorChen opened this issue Sep 14, 2024 · 2 comments · Fixed by #78
Closed

Change default host to empty string #75

timtorChen opened this issue Sep 14, 2024 · 2 comments · Fixed by #78

Comments

@timtorChen
Copy link

timtorChen commented Sep 14, 2024

After upgrade from v0.3.1 to v0.4.0, I found kromgo is not be able to access form the nginx.
It seems the default value separated after summer cleaning cuase the issue.

ServerHost string `env:"SERVER_HOST" envDefault:"localhost"`
ServerPort int `env:"SERVER_PORT" envDefault:"8080"`
HealthHost string `env:"HEALTH_HOST" envDefault:"localhost"`
HealthPort int `env:"HEALTH_PORT" envDefault:"8888"`

It would be more suitable for a default use case by changing default ServerHost to an empty string "" or "0.0.0.0".

@kashalls
Copy link
Owner

Sorry, this one got lost in my box somehow...

I can default this to be "0.0.0.0" which makes more sense. The issue with the health server though is that you don't particularly want to expose this, so this might stay as localhost. and can be configured if needed.

@timtorChen
Copy link
Author

Never mind, thank for your awesome project.

Hmm, I have a different point of view. As the health server is designed for Prometheus to scrape, and Prometheus is typically an external server to Kromgo. Thus, I think it might make sense for the HealthHost to also default to 0.0.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants