docker-compose-collection/traefik
2023-02-05 16:32:56 +08:00
..
docker-compose.yaml Add traefik 2023-02-05 16:32:56 +08:00
dynamic.yml Add traefik 2023-02-05 16:32:56 +08:00
readme.md Add traefik 2023-02-05 16:32:56 +08:00
traefik.yml Add traefik 2023-02-05 16:32:56 +08:00

Traefik configutaion

I personally use this Traefik stack to serve my self-hosted service

  • Split the static configuration and dynamic configuration
    • Enable experimental https3
    • File provider options in dynamic.yml (Used to customize Non-docker service)
  • Enable the Wildcard Lets encrypt with Cloudflare API
    • DNS challenge with no port open need
    • Widcard options in traefik.yml
  • Enable and encrypt the traefik dashboard with authfile

I disabled the auto proxy to newly added docker container in traefik. Just add the label in each container.

labels:
            - "traefik.enable=true"
            - "traefik.http.routers.subservice.rule=Host(`subservice.xxx.domain`)"
            - "traefik.http.routers.subservice.entrypoints=websecure"
            - "traefik.http.routers.subservice.tls.certresolver=letsencrypt"