title: Traefik docker-compose only creating one frontend route instead of 3
body: <p>I want traefik to routh specific paths to my nginx service.
  The setup below works on my development environment, but not on a live
  environment.</p>
  
  <p>The issue is, for the nginx service it only ever creates one of the frontend
  routes, usually just static, or just media. It's as if it finds one, creates it
  and then just doesn't bother with the rest.</p>
  
  <p>If I restart my containers, then traefik will randomly do only one of the routes
  again, but never all 3 as it does on my dev machine.</p>
  
  <p>docker-compose.yml</p>
  
  <pre><code>version: '3'
  
  services:
  
      db:
          image: postgres:latest
  
      webapp:
          build:
          context: ./src/webapp/
          env_file:
          - .env
          volumes:
          - "./resources:/mnt/resources/"
          depends_on:
          - db
          links:
          - "db:dbhost"
          labels:
          - "traefik.backend=webapp"
          - "traefik.port=8000"
          - "traefik.webapp.entryPoints=https"
          - "traefik.webapp.frontend.rule=Host:my.domain.example"
  
      nginx:
          build:
          context: ./src/nginx/
          volumes:
          - ./resources:/mnt/resources
          labels:
          - "traefik.backend=nginx"
          - "traefik.port=443"
          - "traefik.frontend.entryPoints=https"
          - "traefik.static.frontend.rule=Host:my.domain.example;PathPrefix:/static"
          - "traefik.media.frontend.rule=Host:my.domain.example;PathPrefix:/media"
          - "traefik.sw.frontend.rule=Host:my.domain.example;Path:/service-worker.js"
  
      traefik:
          image: traefik:1.6.3
          restart: always
          ports:
          - "80:80"
          - "443:443"
          - "8080:8080"
          volumes:
          - /var/run/docker.sock:/var/run/docker.sock
          - ./src/traefik/traefik.toml:/traefik.toml
          - ./src/traefik/acme.json:/acme.json
  </code></pre>
  
  <p>A separate question but still traefik related:</p>
  
  <p>Traefik is supposed to fetch letsencrypt certs for the main.domain, and does so
  perfectly well for that domain.</p>
  
  <p>But it's also trying to fetch certs for the db and traefik service.
  How do I tell traefik not to fetch certs for these services?</p>