Traefik don't listen to post 80

Hey guys,

i have this docker-compose.yml on my server:

version: "3.7"

services:
  traefik:
    image: traefik:latest
    container_name: traefik
    restart: always
    depends_on:
      - account_app_nginx
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:rw
      - ./traefik/traefik.toml:/etc/traefik/traefik.toml:ro
      - ./traefik/routing.toml:/etc/traefik/routing.toml:ro
      - ./traefik/certs:/certs:rw
    ports:
      - 80:80
      - 8080:8080
      - 443:443
    labels:
      - traefik.http.routers.api.rule=Host(`${TRAEFIK_URL}`)
      - traefik.http.routers.api.service=api@internal
      - traefik.http.routers.api.middlewares=auth
      - traefik.http.middlewares.auth.basicauth.users=admin:$$2y$$05$$O/F51ypL6pGkFyk65MGhx.htOTpQ4iYj1t/3j2OCDvyuLUnwaQ9QK
    networks:
      unitfactory:
        ipv4_address: 192.255.0.2

  database:
    image: library/mariadb:10.4
    container_name: database
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=secret
    volumes:
      - ./mariadb/conf.d:/etc/mysql/conf.d
      - ./mariadb/database/initdb.d/:/docker-entrypoint-initdb.d/:ro
      - database:/var/lib/mysql
    ports:
      - 3306:3306
    networks:
      unitfactory:
        ipv4_address: 192.255.0.3

  account_app_nginx:
    build: nginx
    container_name: account_app_nginx
    restart: always
    depends_on:
      - account_app_php
    environment:
      - PHP_CONTAINER=account_app_php
    volumes:
      - /var/www/html/:/app/:ro
    labels:
      - traefik.enable=true
      - traefik.http.routers.unitfactory_account_app.tls=true
      - traefik.http.routers.unitfactory_account_app.entrypoints=https
      - traefik.http.routers.unitfactory_account_app.rule=Host(`https://mydomain`)
    networks:
      unitfactory:
        ipv4_address: 192.255.0.123
  account_app_php:
    build: php
    container_name: account_app_php
    restart: always
    volumes:
      - /var/www/html/:/app/
    expose:
      - 9001
    networks:
      unitfactory:
        ipv4_address: 192.255.0.124

My Problem is, that my url (staging server) is not accessable from outside.

netstat -tuplen
brings:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      101        21635      623/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          40807551   3668171/sshd: /usr/
tcp6       0      0 :::3306                 :::*                    LISTEN      0          33628      2354/docker-proxy
tcp6       0      0 :::3307                 :::*                    LISTEN      0          35162      2403/docker-proxy
tcp6       0      0 :::22                   :::*                    LISTEN      0          40807553   3668171/sshd: /usr/
udp        0      0 127.0.0.53:53           0.0.0.0:*                           101        21634      623/systemd-resolve

It seems, that traefik / docker don't listen on port 80 / 443. Firewall has the Port open. What did i wrong?

Cheers
Ralf

Hi there @ralf,

To listen on port you need to define entrypoints : EntryPoints - Traefik.

If you want an example on how to do so, take a look at the user guide ( Basic Example - Traefik ) or my own server traefik configuration ( make-my-server/docker-compose.traefik.yml at 1691eff53802cf011f83fbb9c0a32a8bf9dafcec · tomMoulard/make-my-server · GitHub ).

Cheers
Tom

Thanks Tom, i found the Problem. The traefik.toml was missing