Cannot get Traefik to work with Swarm

Hi! I am taking an online course on Traefik. The course creator was able to stack deploy with the below configs. I tried moving the labels under deploy and adding swarmMode: true but the result is the same. Both the dashboard and the app keeps loading forever and nothing happens. What am I missing?

traefik.yml

################################################################
# API and dashboard configuration
################################################################
api:
  # Dashboard
  #
  #
  dashboard: true
  insecure: true
################################################################
# Docker configuration backend
################################################################
providers:
  docker:
    exposedByDefault: false
################################################################
# Traefik Logging
################################################################
log:
  level: INFO

################################################################
# Entrypoint
################################################################
entryPoints:
  web:
    address: ":80"
  websecure:
    address: ":443"

docker-compose.yml

version: '3'

services:
  traefik:
    # The latest official supported Traefik docker image
    image: traefik:v2.3
    # Enables the Traefik Dashboard and tells Traefik to listen to docker
    # enable --log.level=INFO so we can see what Traefik is doing in the log files
    ports:
      # Exposes port 80 for incomming web requests
      - "80:80"
      - "443:443"
      # The Web UI port http://0.0.0.0:8080 (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
      - ./traefik.yml:/etc/traefik/traefik.yml

# Add the catapp service
  catapp:
     # A Random Cat GIF generator application
     image: mikesir87/cats:1.0
     # We set a label to tell Traefik to assign a hostname to the new service
     labels:
      - "traefik.enable=true"
      - "traefik.http.routers.catapp.rule=Host(`catapp.localhost`)"
      - "traefik.http.routers.catapp.entrypoints=web"
      - "traefik.http.routers.catapp.service=catapp"
      - "traefik.http.services.catapp.loadbalancer.server.port=5000"

Answering my own question. It's a long known issue with Chrome: Google chrome and localhost in swarm mode - #11 by trulses - General Discussions - Docker Community Forums

Using Firefox, it works as expected.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.