I am working on a node-red setup here with some node emulating a hue bridge. Sadly this requires some node listening on port 80, which basically collides with my http -> https redirection.
Would it be possible to do a 'catchall' tcp service like that?
reverse-proxy:
image: traefik:2.1
restart: unless-stopped
command:
- "--api=true"
- "--providers.docker=true"
- "--entrypoints.http.address=:80"
- "--entrypoints.hue-emulation.address=:80"
- "--entrypoints.https.address=:443"
ports:
- "80:80" # The HTTP port
- "443:443" # The HTTPS port
- "9090:9090" # Web API
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-http.rule=Host(`${TRAEFIK_HOSTNAME}`)"
- "traefik.http.routers.api-http.entrypoints=http"
- "traefik.http.middlewares.api-http.redirectscheme.scheme=https"
- "traefik.http.routers.api-https.tls=true"
- "traefik.http.routers.api-https.entryPoints=https"
- "traefik.http.routers.api-https.rule=Host(`${TRAEFIK_HOSTNAME}`)"
- "traefik.http.routers.api-https.service=api@internal"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/rancher/management/traefik:/etc/traefik
- temp:/tmp
- certstore:/certs
networks:
- default
- traefik_proxy
node-red:
image: nodered/node-red:latest
restart: unless-stopped
volumes:
- type: volume
source: nodered-data
target: /data
environment:
- TS=Europe/Vienna
labels:
- "traefik.enable=true"
- "traefik.http.routers.nodered.rule=Host(`${NODERED_HOSTNAME}`)"
- "traefik.http.routers.nodered.entrypoints=http"
- "traefik.http.middlewares.nodered.redirectscheme.scheme=https"
- "traefik.http.routers.nodered-secure.tls=true"
- "traefik.http.routers.nodered-secure.entryPoints=https"
- "traefik.http.routers.nodered-secure.rule=Host(`${NODERED_HOSTNAME}`)"
- "traefik.http.services.nodered-secure.loadbalancer.server.port=1880"
- "traefik.tcp.routers.hue-emulation.rule=HostSNI(`*`)"
- "traefik.tcp.routers.hue-emulation.entrypoints=hue"
- "traefik.tcp.routers.hue-emulation.service=hue"
- "traefik.tcp.services.hue.loadbalancer.server.port=8080"
networks:
- traefik_proxy