ItsEcholot / ContainerNursery

Puts Docker Containers to sleep and wakes them back up when they're needed
MIT License
94 stars 6 forks source link

disable loading page feature #58

Open gi4no opened 5 months ago

gi4no commented 5 months ago

This PR adds an option to disable the default loading page. With this option enabled, the request will hang until the container is ready. Then, the response will be the real response of the container, not the loading page.

In my case, I have an API server. When I call the API, the 200 HTTP response used to be the content of the HTML loading page. With this feature, the 200 response will be the actual server response.

added global config disableDefaultLoadingPage for disable all loading page added proxy config enableDefaultLoadingPage for enable loading page if the disableDefaultLoadingPage=true added proxy config customHttpStatusReadyChecking for have custom http status for ready check of the container

I would like to thank you of this library for their hard work and dedication. This change will be a valuable addition to the library.

Let me know what u think!

Thank you!

gi4no commented 5 months ago

related to https://github.com/ItsEcholot/ContainerNursery/issues/57

accforgithubtest commented 4 months ago

Any chance this could be a workaround for issue #56 ?

gi4no commented 4 months ago

@accforgithubtest try this image ghcr.io/gi4no/containernursery:docker-image and let me know

add the options disableDefaultLoadingPage: true for disable default loading page

accforgithubtest commented 4 months ago

Thanks @gi4no - I just tried it with filebrowser and it seems to help. Previously filebrowser was having the issue #56. So this might be a potential workaround.

Any ideas for when this pr might be merged ? I will stay on ghcr.io/gi4no/containernursery:docker-image for a while longer to test it out.

Thanks again !

accforgithubtest commented 4 months ago

@gi4no - Is it possible to have a global setting for disableDefaultLoadingPage: true that applies to all the applications configured in CN ?

I think that will be useful to have one global config to disable loading page for all applications in CN instead of adding the config for each and every config. Just a suggestion if it can be done. Thanks !

gi4no commented 4 months ago

@accforgithubtest

i've add the global config, set disableDefaultLoadingPage: true on top of the yaml file. You can try it with this image ghcr.io/gi4no/containernursery:v0.0.2

ItsEcholot commented 4 months ago

Thanks for this, I will try to find some time to review and merge it this weekend.