[英]How do I configure Traefik with this?
I can't for the life of me figure out how this should be setup.我一生都无法弄清楚应该如何设置。
Here's the docker-compose.yml
(heavily redacted)这是
docker-compose.yml
(大量编辑)
version: '2'
services:
traefik:
container_name: traefik
image: traefik:latest
command:
- --entrypoints.web.address=:80
- --providers.docker
- --api.insecure
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
web:
transmission:
image: linuxserver/transmission
container_name: transmission
volumes:
- # bla bla bla
restart: unless-stopped
labels:
- traefik.http.routers.transmission.rule=Host(`transmission.foo.lan`)
- traefik.http.services.transmission.loadbalancer.server.port=9091
- traefik.docker.network=web
environment:
- TZ=Europe/ahhdsa
- PUID=1234
- PGID=1234
ports:
- 9091:9091
dns:
# local dns
networks:
web:
extravlan:
ipv4_address: # local ip
networks:
web:
external: true
extravlan:
driver: macvlan
# plus configuration for interface
I have DNS working, traefik & transmission are on the same machine.我有 DNS 工作,traefik 和传输在同一台机器上。 But I can't visit transmission.foo.lan from my laptop (no firewall rules blocking this either), it just times out.
但是我无法从我的笔记本电脑访问transmission.foo.lan(也没有防火墙规则阻止它),它只是超时。
Any pointers?任何指针?
I think you are missing - "traefik.enable=true"
and entrypoint
on the router label on the transmission container.我认为您缺少
- "traefik.enable=true"
和传输容器上路由器标签上的entrypoint
点。
Try:尝试:
version: '2'
services:
traefik:
container_name: traefik
image: traefik:latest
command:
- --entrypoints.web.address=:80
- --providers.docker
- --api.insecure
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
web:
transmission:
image: linuxserver/transmission
container_name: transmission
volumes:
- # bla bla bla
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.transmission.rule=Host(`transmission.foo.lan`)
- traefik.http.services.transmission.loadbalancer.server.port=9091
- traefik.http.routers.transmission.entrypoint=web
# - traefik.docker.network=web
environment:
- TZ=Europe/ahhdsa
- PUID=1234
- PGID=1234
ports:
- 9091:9091
dns:
# local dns
networks:
web:
extravlan:
ipv4_address: # local ip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.