- Before we begin, lets cleanup any running Docker stack
docker stack rm traefik
If you named you stack something else use your specified name. If you don't remember rundocker stack ls
- Change to the
07-Operations
folder - Open the
traefik.yml
file in your favorite editor and review theTraefik API, Dashboard & Ping sections
section - In the API section Change
insecure
fromtrue
tofalse
which is default
api:
# Dashboard
# true = default
#
dashboard: true
#
# insecure: false is default
#
insecure: false
- Review the docker
HEALTHCHECK
indocker-compose.cli.yml
healthcheck:
test: ["CMD", "traefik", "healthcheck"]
interval: 10s
timeout: 2s
retries: 3
start_period: 5s
- Start Traefik with Ping endpoint, Secure Mode ,and Docker
HEALTHCHECK
->docker stack deploy -c docker-compose.cli.yml traefik
- Run
docker ps
notice the traefik container status now has Health status - Open the Ping endpoint http://your_domain_here/ping
- Make an API request http://your_domain_here:8080/api/http/routers
- Open the Dashboard. Ensure to have the trailing "/" http://your_domain_here/dashboard/
- The full list of API requests can be found here https://docs.traefik.io/operations/api/