Fors off: I am a total beginner when it comes to docker. I do have some self hosting ecperience, but run pretty much everything in its on lxc and treat it like a full linux system.
Recently I installed immich in a container and was surprised to see how well it worked.
This lead my to finally tackle something I have been putting off for way to long; installing nightscout (a self hosten glucose monitoring&reporting utility).
For that I followed their guide. Everything worked well up untill the point where I wanted to connect to the web interface. I started of by entering my domain into the nightscout containers arguments (in the form subdomain.domain.tld). Then I used my reverse proxy (nginx, not inside docker) to forward the subdomain to the docker IP on Ports 443, then 80 and lastly the one displayed at the container when listing them with docker ps. None of those worked (I was not able to get a certificate using letsEncrypt and got a 404 when connecting without tls).
I then entered nighscout.[docker-IP] and tried to access it dkrectly which did not work either.
When googling I only find comparisons on how to set up nginx in Docker, or comparisons between the two.
JASN_DE@feddit.org 5 days ago
There is no need to run Traefik if you already have a working reverse proxy. Also, unless your nginx is running on non-standard ports, the ports 80 and 443 should not be available for traefik, which will prevent it from working correctly.
needanke@feddit.org 5 days ago
My Nginx is running in the same local network but on a different IP so there should not be acollision with the traefik ports.
needanke@feddit.org 5 days ago
How do I connect to the container without traefik (from my local network)?
When I remove all the traefic references and then run docker ps I get
But I can’t reach it under dockerIP:1337.
With Immich it had 0.0.0.0:port as its IP and I was able to reach it that way.
CHOPSTEEQ@lemmy.ml 5 days ago
Your ports are not mapped so the host system doesn’t know about them. You only have them exposed, which is for docker communication.
Map your ports and then you’ll be able to access them by host-ip:mapped-port.
Then you can use nginx to proxy to that.
MysteriousSophon21@lemmy.world 4 days ago
You need to add a ports section to your compose file like
ports: - “1337:1337”
- the container exposes 1337 internally but you haven’t mapped it to the host so it’s not accessible from outside the container.