version: '3'

services:
  traefik:
    image: traefik:v2.0
    command: --api.insecure=true --providers.docker
    networks:
      - project1
      - project2
    ports:
      - '80:80'
      - '8080:8080'
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

networks:
  project1:
    external: 
      name: project1-dir_default
  project2:
    external:
      name: project2-dir_default

