Comment on How do I manage docker&Traefik behind a reverse proxy not on docker.
SheeEttin@lemmy.zip 1 week ago
Why are you using both nginx and traefik?
Comment on How do I manage docker&Traefik behind a reverse proxy not on docker.
SheeEttin@lemmy.zip 1 week ago
Why are you using both nginx and traefik?
needanke@feddit.org 1 week ago
Because 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.
hedgehog@ttrpg.network 1 week 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 1 week ago
This is what I would try first. It looks like 1337 is the exposed port, per github.com/nightscout/…/Dockerfile
SheeEttin@lemmy.zip 1 week ago
Then drop nginx and just use traefik.
needanke@feddit.org 1 week ago
Thats what all my other services use though and I don’t know how I’d connect them to traefic.
MaggiWuerze@feddit.org 6 days 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 1 week ago
I recently posted most of my traefik configs, you can use it as a base to learn how traefik works:
Note that I might not be much help with troubleshooting, as this took me a lot of trial and error and googling to make work.
SheeEttin@lemmy.zip 1 week 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.