#version: "3.3"

services:
  traefik:
    image: traefik:latest
    container_name: traefik
    command:
      - --log.level=DEBUG
      - --configFile=/etc/traefik/traefik.yml
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
    environment:
      - AWS_ACCESS_KEY_ID=${AWS_KEY}
      - AWS_SECRET_ACCESS_KEY=${AWS_SECRET}
      - AWS_REGION=${AWS_REGION}
      - AWS_HOSTED_ZONE_ID=${AWS_ZONEID}
    ports:
      - 80:80
      - 8380:8080
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - /opt/docker/conf/traefik-esh:/etc/traefik
    labels:
      - homepage.group=ESH
      - homepage.name=traefik
      - homepage.icon=si-traefikproxy
      - homepage.sitemonitor=http://10.0.50.45:8380
      - homepage.href=http://10.0.50.45:8380
      - homepage.widget.type=traefik
      - homepage.widget.url=http://10.0.50.45:8380
    networks:
      - tnet
    env_file:
      - .env
      
networks:
  tnet:
    name: traefik-net
    external: true
