I'm trying to forward home.example.com/storj to port 14002 where the Storj Node dashboard lives. I think I'm close, but it's still not working. Here's what I've got:
traefik.yml
entryPoints:
http:
address: ":80"
https:
address: ":443"
api:
dashboard:true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
watch: true
traefik docker-compose.yml
version: '3'
services:
reverse-proxy:
image: traefik:v2.11
ports:
- "80:80"
- "443:443"
networks:
- traefik-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/traefik.yml:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`home.example.com`) || Host(`192.168.1.22`)"
- "traefik.http.routers.api.entrypoints=http"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.api.middlewares=redirect-to-https"
- "traefik.http.routers.api-secure.rule=Host(`home.example.com`) || Host(`192.168.1.22`)"
- "traefik.http.routers.api-secure.service=api@internal"
- "traefik.http.routers.api-secure.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=username:$$apr1$$kFRH3MG5$$e3d6.gCHkXKMJus84Yv1e1"
- "traefik.http.routers.api-secure.entrypoints=https"
- "traefik.http.routers.api-secure.tls=true"
networks:
traefik-proxy:
external: true
storj docker-compose.yml
version: "3.8"
services:
storj:
image: storjlabs/storagenode
container_name: storagenode
restart: unless-stopped
ports:
- 28967:28967/tcp
- 28967:28967/udp
- 14002:14002
environment:
- WALLET="0xthisismywallethash"
- EMAIL="username@email.com"
- ADDRESS="home.example.com:28967"
- STORAGE="2TB"
volumes:
- type: bind
source: /home/username/.local/share/storj/identity/storagenode
target: /app/identity
- type: bind
source: /mnt/storj
target: /app/config
labels:
- "traefik.enable=true"
- "traefik.http.routers.storj.rule=(Host(`home.example.com`) || Host(`192.168.1.22`)) && PathPrefix(`/storj`)"
- "traefik.http.services.storj.loadbalancer.server.port=14002"
- "traefik.http.middlewares.storj-stripprefix.stripprefix.prefixes=/storj"
- "traefik.http.routers.storj.middlewares=storj-stripprefix"
networks:
- traefik-proxy
networks:
traefik-proxy:
external: true
Everything in the Traefik dashboard says Success, but it's still not loading the page. I'm not getting an error, the page just doesn't load. It even loads the favicon! When I click on the corresponding entry in the Traefik dashboard, I see that its final routing is to the Docker internal IP, http://172.21.0.4:14002. Is that what should be happening? What am I missing?! I'm soo close!!