That was me grasping at straws. The name shouldn't need to be defined at all, but I gave it a shot.
Not sure what you mean here, are you referring to the macvlan?
Right you are, there are a lot of bugs in that config. I was trying to focus on the macvlan part of it but ended up cleaning it up some when it killed my spirit
Here is the config I am working with currently, but macvlan still has the same errors.
version: '3.3'
services:
traefik:
image: traefik:latest
container_name: traefik
ports:
- target: 80
published: 80
protocol: tcp
# mode: host
- target: 443
published: 443
protocol: tcp
# mode: host
# - target: 8080
# published: 8080
# protocol: tcp
command:
- --log.level=WARN
# - --ping=true
# - --ping.entryPoint=ping
#entrypoints
# - --entrypoints.web.http.redirections.entryPoint.to=websecure
# - --entrypoints.web.http.redirections.entryPoint.scheme=https
- --entrypoints.https.forwardedHeaders.trustedIPs=173.245.48.0/20,103.21.244.0/22,103.22.200.0/22,103.31.4.0/22,141.101.64.0/18,108.162.192.0/18,190.93.240.0/20,188.114.96.0/20,197.234.240.0/22,198.41.128.0/17,162.158.0.0/15,104.16.0.0/12,172.64.0.0/13,131.0.72.0/22
- --entrypoints.websecure.http.tls=true
- --entryPoints.web.forwardedHeaders.insecure
- --entryPoints.web.address=:80
- --entryPoints.websecure.address=:443
- --providers.docker=true
# - --providers.docker.network=macvlan-5
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
# - --docker.domain=moderncaveman.us
- --api.dashboard=true
# - --api.insecure=true
#Resolvers
# - --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
# - --certificatesresolvers.letsstaging.acme.httpchallenge.entrypoint=web
- --certificatesresolvers.letsencrypt.acme.dnschallenge=true
- --certificatesresolvers.letsencrypt.acme.dnschallenge.provider=cloudflare
- --certificatesresolvers.letsencrypt.acme.email=cory@email.com
- --certificatesresolvers.letsencrypt.acme.tlschallenge=true
- --certificatesresolvers.letsstaging.acme.tlschallenge=true
- --certificatesresolvers.letsstaging.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
- --certificatesresolvers.letsstaging.acme.email=cory@email.com
- --certificatesresolvers.letsencrypt.acme.storage=/ssl/acme.json
- --certificatesresolvers.letsstaging.acme.storage=/ssl/acme-staging.json
#logging
- --accesslog
- --accesslog.format=json
- --log
- --accesslog.filepath=/logs/traefik-access.log
- --log.filepath=/logs/traefik.log
- --log.format=json
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- traefik-ssl:/ssl/
- traefik-logs:/logs/
networks:
- public
- macvlan-5
deploy:
mode: global
labels:
- traefik.enable=true
- traefik.docker.network=macvlan-5
- traefik.http.routers.api.rule=Host(`traefik.moderncaveman.us`)
- traefik.http.routers.api.entrypoints=websecure,web
- traefik.http.routers.api.tls=true
- traefik.http.routers.api.tls.certresolver=letsencrypt
- traefik.http.routers.api.service=api@internal
- traefik.http.services.traefik.loadbalancer.server.port=8080
- traefik.http.services.traefik.loadbalancer.server.scheme=https
# - traefik.http.routers.traefik-tls.tls.domains[0].main=moderncaveman.us
# - 'traefik.http.routers.traefik-tls.tls.domains[0].sans=*.moderncaveman.us'
#Authela
# - 'traefik.http.middlewares.authelia.forwardAuth.address=http://authelia:9091/api/verify?rd=https%3A%2F%2Fauth.example.com%2F'
# - 'traefik.http.middlewares.authelia.forwardAuth.trustForwardHeader=true'
# - 'traefik.http.middlewares.authelia.forwardAuth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email'
# uncomment this to enable forward authentication on the traefik api/dashboard
# - traefik.http.routers.api.middlewares=forward-auth
placement:
constraints: [node.role == manager]
whoami:
image: "traefik/whoami"
container_name: "simple-service"
command:
- --name=whoami
networks:
- macvlan-5
- public
deploy:
labels:
traefik.enable: "true"
traefik.docker.network: macvlan-5
traefik.http.services.whoami.loadbalancer.server.port: 80
traefik.http.routers.whoami.rule: "Host(`whoami.moderncaveman.us`)"
traefik.http.routers.whoami.entrypoints: websecure,web
# traefik.http.routers.whoami.tls: "true"
# traefik.http.routers.whoami.tls.certresolver: letsencrypt
networks:
public:
driver: overlay
macvlan-5:
external: true
driver: macvlan #"<- tried with and without driver. Volume works either way, but traefik can't find it based off the label"
volumes:
traefik-ssl:
driver_opts:
type: nfs
o: addr=192.168.40.91,nfsvers=4
device: :/volume2/docker-pool/traefik/ssl/
traefik-logs:
driver_opts:
type: nfs
o: addr=192.168.40.91,nfsvers=4
device: :/volume2/docker-pool/traefik/logs/
whoami in the above stack is still resolving to it's internal network IP, and not macvlan-5
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:07-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:07-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:40:16-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:16-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:16-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:40:22-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:22-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:22-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:40:37-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:37-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:37-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:40:46-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:46-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:46-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:40:52-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:52-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:40:52-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:41:07-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:41:07-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:41:07-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:41:16-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:41:16-06:00"}
{"container":"traefik-traefik-kst3ov08i79t5ffzl3cpd4p5z","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.kst3ov08i79t5ffzl3cpd4p5z'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:41:16-06:00"}
{"container":"traefik-whoami-u63zm5bvkwgh8b4b7f2ibd778","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_whoami.1'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"whoami","time":"2022-11-25T01:41:22-06:00"}
{"container":"traefik-traefik-hwwekml7tc9kfaidruzqej26o","level":"warning","msg":"Could not find network named 'macvlan-5' for container 'traefik_traefik.hwwekml7tc9kfaidruzqej26o'! Maybe you're missing the project's prefix in the label? Defaulting to first available network.","providerName":"docker","serviceName":"traefik","time":"2022-11-25T01:41:22-06:00"}