This took me days to figure out how to configure Traefik v2. Here it is for posterity.
This is a docker-compose.yaml fragment to append to a service section:
labels:
- "traefik.enable=true"
- "traefik.http.routers.service.rule=Host(`www.example.com`)"
- "traefik.http.routers.service.entrypoints=websecure"
- "traefik.http.routers.service.tls.certresolver=myresolver"
↧