version: "3.7"

services:
  http:
    image: docker.io/library/traefik:v2.9
    command:
      - "--providers.docker"
      - "--providers.docker.exposedByDefault=false"
      - "--providers.docker.network=${DOCKER_NETWORK_NAME}"
      - "--providers.docker.constraints=Label(`eu.wiss-ki.barrel.distillery`,`${DOCKER_NETWORK_NAME}`)"
      - "--entrypoints.web.address=:80"

      ## for debugging purposes, the following can be enabled.
      # - "--api.insecure=true"
    #ports:
    #  # - "80:80"
    #  # - "127.0.0.1:8888:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
    restart: always
    networks:
      - default

networks:
  default:
    name: ${DOCKER_NETWORK_NAME}
    external: true
