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.
Comment on How do I manage docker&Traefik behind a reverse proxy not on docker.
needanke@feddit.org 1 week agoHow 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
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [removed] nightscout/cgm-remote-monitor:latest "docker-entrypoint.s…" 6 seconds ago Up 5 seconds 1337/tcp nightscout [removed] mongo:4.4 "docker-entrypoint.s…" 37 hours ago Up 5 seconds 27017/tcp docker-mongo-1
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.
MysteriousSophon21@lemmy.world 1 week ago
CHOPSTEEQ@lemmy.ml 1 week 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.