ItsEcholot / ContainerNursery

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

nursery with lan urls http://nas.l:12345 #41

Closed warlordattack closed 1 year ago

warlordattack commented 1 year ago

Hello now my containers work well when called from external url : dn-petio.monsite.com dn-ombi.monsite.com ....

I have 40 containers, and i access them both from web and from lan. In fact i use external urls only when i am not at home. At home lan URLs are much more faster/responsive.

Lan urls are all something like : http://nas.l:12345 Always the same nas ip or nas lan name but port is changing for every container.

I have two Dashy dashboards , they are identical but one use lan urls the second use external urls.

Now i use nursery for some containers, works well with external urls, bit how do i make this work with lan urls please ? http://nas.l:12345 http://nas.l:12346 http://nas.l:12347 http://nas.l:12348

I would like to make container wake up when i use my lan dashboard with lan urls, like this : http://nas.l:12345

How could i make this happen please ?

ItsEcholot commented 1 year ago

To use ContainerNursery it needs to act as a reverse proxy for your services, i.e you can't access your services/containers directly over the different ports since in that case ContainerNursery isn't acting as a reverse proxy and thus also doesn't know when you last accessed the container. To achieve this locally there are multiple valid approaches, I created a small writeup on the Unraid forums (https://forums.unraid.net/topic/113506-support-containernursery/) maybe this can be useful as a starting point.

Since this isn't a software issue or feature request I will be closing this now.