Xabaril / AspNetCore.Diagnostics.HealthChecks

Enterprise HealthChecks for ASP.NET Core Diagnostics Package
Apache License 2.0
4.06k stars 793 forks source link

Options from environment variables #265

Closed pthelusma closed 4 years ago

pthelusma commented 5 years ago

Hello, using the docker image but I cannot seem to find a way to pass in environment variables or use appsettings to override the default UIPath and APIPath. Is there a way to do this already? Would this be a viable option to contribute to the codebase?

peterbomers commented 5 years ago

I have almost the same question We like to do some branding of the docker image. Is it possible to specify an inline css environment variable? Or add a specific key to the AAC service?

CarlosLanderas commented 5 years ago

I have already thought about the CSS stuff. I'm gonna add some parameters for docker.

For the API paths, let me take a look

cilerler commented 5 years ago

👍 for CSS environment variable

CarlosLanderas commented 4 years ago

This afternoon I'm gonna add this functionality.

The image will allow to configure custom css for branding using a volume and all the paths:

docker run

-v /c/temp/css:/app/css

-e ui_stylesheet=/app/css/dotnet.css

-e ui_path=/healthchecks-e ui_resources_path=/static

-e ui_api_path=/health-api 

-p 5000:80 xabarilcoding/healthchecksui:latest
pthelusma commented 4 years ago

Will the ui_path accept just "/" as well?

CarlosLanderas commented 4 years ago

@pthelusma, asp.net core middleware does not allow to bind "/" as a valid path. It throws an exception

pthelusma commented 4 years ago

Makes sense. Thank you

CarlosLanderas commented 4 years ago

Available in UI Version 3.0.3

PR:

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/pull/332

Updated docs:

https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks/blob/master/doc/ui-docker.md