- Before we begin, lets cleanup any running Docker stack
docker stack rm traefikIf you named you stack something else use your specified name. If you don't remember rundocker stack ls - Change to the
07-Operationsfolder - Open the
traefik.ymlfile in your favorite editor and review theTraefik API, Dashboard & Ping sectionssection - In the API section Change
insecurefromtruetofalsewhich is default
api:
# Dashboard
# true = default
#
dashboard: true
#
# insecure: false is default
#
insecure: false- Review the docker
HEALTHCHECKindocker-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 psnotice 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/
