I am using the docker-compose file below, but for some reason the address hostname.tld/traefik is showing a plain 404 page not found
text.
version: "3.3"
services:
traefik:
image: "traefik:v2.0.2"
container_name: "traefik"
restart: always
networks:
- traefik_proxy
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=true"
- "--entrypoints.web.address=:8080"
- "--providers.docker.watch=true"
ports:
- "443:443"
- "8080:8080"
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /home/bruno/traefik/traefik.toml:/traefik.toml
- /home/bruno/traefik/acme.json:/acme.json
- /home/bruno/traefik/error.log:/error.log
labels:
- "traefik.enable=true"
- "traefik.port=8080"
- "traefik.docker.network=traefik_proxy"
- "traefik.http.routers.traefik.rule=Host(`hostname.tld`) && PathPrefix(`/traefik`)"
- "traefik.http.routers.traefik.tls"
- "traefik.http.middlewares.traefik.headers.SSLRedirect=true"
- "traefik.http.middlewares.traefik.headers.STSSeconds=315360000"
- "traefik.http.middlewares.traefik.headers.browserXSSFilter=true"
- "traefik.http.middlewares.traefik.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.traefik.headers.forceSTSHeader=true"
- "traefik.http.middlewares.traefik.headers.SSLHost=${DOMAIN_NAME}"
- "traefik.http.middlewares.traefik.headers.STSIncludeSubdomains=true"
- "traefik.http.middlewares.traefik.headers.STSPreload=true"
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge
However, in a similar setup, I am running a container on a specific host without any problems:
version: '2.2'
services:
huggin:
image: huginn/huginn
restart: always
container_name: huginn
networks:
- traefik_proxy
ports:
- 3000:3000
labels:
- "traefik.enable=true"
- "traefik.http.routers.huginn.rule=Host(`huginn.${DOMAIN_NAME}`)"
- "traefik.http.routers.huginn.tls"
- "traefik.port=3000"
- "traefik.docker.network=traefik_proxy"
- "traefik.http.middlewares.huginn.headers.SSLRedirect=true"
- "traefik.http.middlewares.huginn.headers.STSSeconds=315360000"
- "traefik.http.middlewares.huginn.headers.browserXSSFilter=true"
- "traefik.http.middlewares.huginn.headers.contentTypeNosniff=true"
- "traefik.http.middlewares.huginn.headers.forceSTSHeader=true"
- "traefik.http.middlewares.huginn.headers.SSLHost=${DOMAIN_NAME}"
- "traefik.http.middlewares.huginn.headers.STSIncludeSubdomains=true"
- "traefik.http.middlewares.huginn.headers.STSPreload=true"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /home/bruno/huginn/mysql:/var/lib/mysql
environment:
- TZ=Europe/London
networks:
traefik_proxy:
external:
name: traefik_proxy
default:
driver: bridge
I ran out of ideas and have been back and forth in the documentation. Does anyone have any ideas on what could cause this?