I am new to traefik and followed a tutorial to set up basic services via docker-compse using wildcard certificates. All routing is done via labels (shown below). I think I've started to grasp handling Docker containers with Traefik, with a successful wordpress site and Traefik dashboard running as desired. The configurations are starting to make sense for the most part.
The next thing I wanted to do seemed like it should be easier than what I have so far, but I'm obviously missing something. I have a synology NAS that I would like to access via synology.mydomain. Just a simple forward to my NAS local ip #.#.#.#:5000. The labels for my Traefik container are shown below with what I've tried, but when I start the containers, I get 404 errors both at synology.mydomain and traefik.mydomain (dashboard). The wordpress site still works at www.mydomain. If I comment out all of the ...synology... labels, everything works fine. If I just comment out the services.synology-svc label, everything else works, and the dashboard shows an error: "the service "synology-svc@docker" does not exist" (which makes sense because I'm pointing to it but never define it). I didn't want to paste the whole docker-compose.yml, but if this isn't enough info, I can do that. Any suggestions are greatly appreciated. I fear I may be approaching this from the wrong angle at this point...
Thanks in advance!
- "traefik.enable=true"
# HTTP-to-HTTPS Redirect
- "traefik.http.routers.http-catchall.entrypoints=http"
- "traefik.http.routers.http-catchall.rule=HostRegexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# HTTP Routers
- "traefik.http.routers.traefik-rtr.entrypoints=https"
- "traefik.http.routers.traefik-rtr.rule=Host(`traefik.$DOMAINNAME`)"
- "traefik.http.routers.traefik-rtr.tls=true"
- "traefik.http.routers.traefik-rtr.tls.domains[0].main=$DOMAINNAME"
- "traefik.http.routers.traefik-rtr.tls.domains[0].sans=*.$DOMAINNAME"
- "traefik.http.routers.synology-rtr.entrypoints=https"
- "traefik.http.routers.synology-rtr.rule=Host(`synology.$DOMAINNAME`)"
- "traefik.http.routers.synology-rtr.tls=true"
## Services - API
- "traefik.http.routers.traefik-rtr.service=api@internal"
## Services - Synology
- "traefik.http.routers.synology-rtr.service=synology-svc"
- "traefik.http.services.synology-svc.loadBalancer.servers.url=http://#.#.#.#:5000"
## Middlewares
- "traefik.http.routers.traefik-rtr.middlewares=chain-oauth@file"
- "traefik.http.routers.synology-rtr.middlewares=chain-no-auth@file"