title: Traefik can't connect to server with docker-compose
body: <p>I'm trying to install <code>gitea</code> and <code>traefik</code> in an Alibaba Cloud instance but I can't get any page or response from <code>traefik</code>. How can I debug this? <code>docker logs traefik</code> has no errors</p>
  
  <p>Here is my <code>docker-compose.yml</code></p>
  
  <pre><code>version: "3"
  
  networks:
    gitea_net:
      external: true
    internal:
      external: false
  
  services:
    db:
      image: postgres:9.6
      restart: always
      environment:
        - POSTGRES_USER=gitea
        - POSTGRES_PASSWORD=gitea
        - POSTGRES_DB=gitea
      labels:
        - "traefik.enable=false"
      networks:
        - internal
      volumes:
        - ./postgres:/var/lib/postgresql/data
  
    traefik:
      image: traefik:latest
      command: --docker
      ports:
        - 80:80
        - 443:443
      labels:
        - "traefik.enable=true"
        - "traefik.backend=dashboard"
        - "traefik.frontend.rule=Host:traefik.mydomain.com"
        - "traefik.port=8080"
      networks:
        - gitea_net
      volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        - ./traefik.toml:/traefik.toml
        - ./acme.json:/acme.json
      container_name: traefik
      restart: always
  
    server:
      image: gitea/gitea:latest
      environment:
        - USER_UID=1000
        - USER_GID=1000
      restart: always
      networks:
        - internal
      volumes:
        - ./gitea:/data
      ports:
        - "3000"
        - "22"
      labels:
        - "traefik.enabled=true"
        - "traefik.backend=gitea"
        - "traefik.frontend.rule=Host:gitea.mydomain.com"
        - "traefik.docker.network=gitea_net"
        - "traefik.port=3000"
      networks:
        - internal
        - gitea_net
      depends_on:
        - db
        - traefik  
  </code></pre>
  
  <p>Here is my <code>traefik.toml</code></p>
  
  <pre><code>#Traefik Global Configuration
  debug = true
  checkNewVersion = true
  logLevel = "ERROR"
  
  #Define the EntryPoint for HTTP and HTTPS
  defaultEntryPoints = ["https","http"]
  
  #Define the HTTP port 80 and
  #HTTPS port 443 EntryPoint
  #Enable automatically redirect HTTP to HTTPS
  [entryPoints]
  [entryPoints.http]
  address = ":80"
  [entryPoints.http.redirect]
  entryPoint = "https"
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
  
  #Enable Traefik Dashboard on port 8080
  #with basic authentication method
  
  [entryPoints.dash]
  address=":8080"
  [entryPoints.dash.auth]
  [entryPoints.dash.auth.basic]
      users = [
          "admin:$apr1$nw$PAVvqQK30eAdrY0l9KCnK1",
      ]
  
  [api]
  entrypoint="dash"
  dashboard = true
  
  #Enable retry sending a request if the network error
  [retry]
  
  #Define Docker Backend Configuration
  [docker]
  endpoint = "unix:///var/run/docker.sock"
  domain = "mydomain.com"
  watch = true
  exposedbydefault = false
  
  #Letsencrypt Registration
  #Define the Letsencrypt ACME HTTP challenge
  [acme]
  email = "mark@gmail.com"
  storage = "acme.json"
  entryPoint = "https"
  OnHostRule = true
    [acme.httpChallenge]
    entryPoint = "http"
  </code></pre>