-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which traefik
docker labels for pointing to an additional webserver?
#3140
Comments
I might be wrong, but I've used the following labels and my other containers are successfully integrated in Traefik: labels:
- traefik.enable=true
- traefik.docker.network=traefik
- traefik.http.routers.[NAME].entrypoints=web-secure
- traefik.http.routers.[NAME].service=[NAME]
- traefik.http.routers.[NAME].rule=[RULE]
- traefik.http.routers.[NAME].tls=true
- traefik.http.routers.[NAME].tls.certResolver=default
- traefik.http.routers.[NAME].tls.domains[0]=[DOMAIN]
- traefik.http.routers.[NAME].tls.domains[0].sans=[SUBDOMAIN]
- traefik.http.services.[NAME].loadbalancer.server.port=[CONTAINER PORT] Also adding the networks config under the compose services: networks:
- traefik and under the compose networks: networks:
traefik:
external: true |
Nice, thanks! I tried it but there is still something that doesn't seem to be quite correctly configured. What is [NAME], is that just name of the docker service ( |
Yes, |
Hi! I want to use the included
traefik
reverse proxy to also handle requests to an additional webserver I'm running in a docker container on the same server as all the other services. I followed this section of the docs where, if I understand correctly, I can add my service totraefik
simply by specifying the correct labels for my docker service. See the configuration I use in mydocker-compose.yaml
below.My service can join the
traefik
docker network just fine, but when I accesshttps://subdomain.myserver.org
I get a 404 not found. I suspect I've misconfigured thetraefik
labels, specifically with regards to thetraefik
router name (it's probably notmyrouter
as I've used 😆), but I don't know what it should be. Anyone that can help a struggling hobbyist out? 😅docker-compose.yaml
The text was updated successfully, but these errors were encountered: