Hey all,
I'm in the process of switching my reverse proxies from Nginx to Traefik v2. I however need to keep my work environment on Windows while keeping things Docker for what I hoped would be simplicity, so I'm using WSL2 to accomplish this. It's been a little learning curve for the last couple of days, but I've managed to get all my Docker services working behind a custom domain/subdomains, certified and with TLS.
It all runs smooth. The issue comes in with routing Windows services, such as downloaders, etc. (which I want to keep on the host system for max bandwidth speed). -- I just can't get them working.
I'm using the typical docker-compose and traefik.yml:
..and http while testing here:
## docker-compose.yml
version: "3.7"
services:
traefik:
image: "traefik:latest"
container_name: "traefik"
hostname: "traefik"
networks:
- traefik_test
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- C:\docker\config\traefik.yml:/traefik.yml:ro
networks:
default:
external:
name: traefik_test
## traefik.yml
log:
level: INFO
api:
insecure: true
dashboard: true
entryPoints:
web:
address: ":80"
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
## DYNAMIC CONFIGURATION
http:
routers:
route-to-local-ip:
rule: "Host(`test.example.com`)"
service: route-to-local-ip-service
priority: 1000
entryPoints:
- web
services:
route-to-local-ip-service:
loadBalancer:
servers:
- url: "http://192.168.0.200:8550"
I'm assuming it's a Traefik/Docker networking issue. I've tried creating networks pointing to the host machine with no luck. I'm not even sure if network will help, I'd figured it was all relayed naturally with Docker Desktop anyway as Nginx Proxy Manager seems to reach outside services fine, so I'm not sure where the issue is.
Anyone with any experience with WSL2 and outside services care to give me a hand with this? I'm a little out of my scope on this one.
Thanks.