services: traefik: image: traefik:v3.2 container_name: traefik restart: unless-stopped network_mode: host security_opt: - no-new-privileges:true ports: - "80:80" - "443:443" environment: - DOCKER_API_VERSION=1.44 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - ./traefik.yml:/etc/traefik/traefik.yml:ro - ./acme.json:/acme.json networks: - traefik-net labels: - "traefik.enable=true" - "traefik.http.routers.traefik-dashboard.rule=Host(`${DASHBOARD_HOST}`)" - "traefik.http.routers.traefik-dashboard.entrypoints=websecure" - "traefik.http.routers.traefik-dashboard.service=api@internal" - "traefik.http.routers.traefik-dashboard.tls.certresolver=letsencrypt" - "traefik.http.routers.traefik-dashboard.middlewares=traefik-auth" - "traefik.http.middlewares.traefik-auth.basicauth.users=${DASHBOARD_USER}:${DASHBOARD_PASSWORD}" networks: traefik-net: external: false