Then drop nginx and just use traefik.
Comment on How do I manage docker&Traefik behind a reverse proxy not on docker.
needanke@feddit.org 3 weeks agoBecause I don’t know how docker works, the .yaml given by nightscout is using traefik and I don’t know how to remove it without breakting the nightscout container.
SheeEttin@lemmy.zip 3 weeks ago
needanke@feddit.org 3 weeks ago
Thats what all my other services use though and I don’t know how I’d connect them to traefic.
MaggiWuerze@feddit.org 3 weeks ago
If they all run on docker, you just have to add labels to them, telling them what domain and port they use, etc (look at the labels from your compose). Then you add the traefik base network to them and presto. Traefik recognizes the labels and automatically routes incoming requests to them and creates certificates for them
DarkSirrush@lemmy.ca 3 weeks ago
SheeEttin@lemmy.zip 3 weeks ago
There’s no time to learn like the present! Your existing compose file has an example, but if that doesn’t work, the traefik docs are useful too.
hedgehog@ttrpg.network 3 weeks ago
To run it with Nginx instead of Traefik, you need to figure out what port Nightscout’s web server runs on, then expose that port, e.g.,
You can remove the labels as those are used by Traefik, as well as the Traefik service itself.
Then just point Nginx to that port (e.g., 3000) on your local machine.
—-
Traefik has to know the port, too, but it will auto detect the port that a local Docker service is running on. It looks like your config is relying on that feature as I don’t see the label that explicitly specifies the port.
hedgehog@ttrpg.network 3 weeks ago
This is what I would try first. It looks like 1337 is the exposed port, per github.com/nightscout/…/Dockerfile