version: "3.3"

services:
  traefik:
    container_name: traefik
    image: "traefik:latest"
    restart: unless-stopped
    command:
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      - --providers.docker
      - --log.level=ERROR
      - --certificatesresolvers.leresolver.acme.httpchallenge=true
      - --certificatesresolvers.leresolver.acme.email=noc@altinea.fr
      - --certificatesresolvers.leresolver.acme.storage=/etc/traefik/acme/acme.json
      - --certificatesresolvers.leresolver.acme.httpchallenge.entrypoint=web
      - --api.insecure=true
      - --providers.docker.exposedByDefault=false
    ports:
      - "80:80"
      - "443:443"
      - "8090:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "acme-json:/etc/traefik/acme"
    labels:
      - "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
      - "traefik.http.routers.http-catchall.entrypoints=web"
    networks:
          traefik:
volumes:
    acme-json:
        driver: local
networks:
    traefik:
      name: traefik