Hello everyone,
I am trying to get a very basic configuration up and running with (initially insecure) Dashboard enabled. To do so, I followed (successfully) the Quick Start tutorial and added the labels required by Dashboard. Unfortunately, I am receiving 404 page not found
. I found a few very similar issues on GitHub and here in the community forums, but none of them really solves my problem.
I would be grateful, if you could correct my docker-compose.yaml
.
version: '3'
services:
reverse-proxy:
# The official v2.0 Traefik docker image
image: traefik:v2.0
# Enables the web UI and tells Traefik to listen to docker
command:
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker"
- "--log.level=DEBUG"
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.entryPoints=traefik"
- "traefik.http.routers.api.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.api.service=api@internal"
- "traefik.http.routers.api.middlewares=api-auth"
- "traefik.http.middlewares.api-auth.basicauth.users=test:$$apr1$$H6uskkkW$$IgXLP6ewTrSuBkTrqE8wj/" # test:test
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
whoami:
# A container that exposes an API to show its IP address
image: containous/whoami
labels:
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
The API works fine:
$ curl http://127.0.0.1:8080/api/rawdata
{"routers":{"api@docker":{"entryPoints":[ ...
The Dashboard doesn't:
$ curl -u test:test http://127.0.0.1:8080/dashboard
404 page not found