tiredofit / docker-traefik-cloudflare-companion

Automatically Create CNAME records for containers served by Traefik
MIT License
404 stars 65 forks source link

Exclude certain containers based on docker-compose label #57

Open Northguy opened 2 years ago

Northguy commented 2 years ago

Description of the feature It is possible to exclude certain subdomain trees from Cloudflare companion by adding these to the environment variables of Cloudflare companion like

DOMAIN1_EXCLUDED_SUB_DOMAINS | (optional specify sub domain trees to be ignored in lables) ex: DOMAIN1_EXCLUDED_SUB_DOMAINS=int would not create a CNAME for *.int.example.com -- | --

Would it also be possible to exclude specific containers from being added to Cloudflare by adding an additional cloudflare-exclude=yes label?

Motivation: I am using a split DNS and I would like Traefik to listen to all subdomains on my LAN (hence all containers have a traefik router label applied), but I only want a few of the containers actually published as subdomain on cloudflare.

proddy commented 2 years ago

I would benefit from this too. So +1

elliotmatson commented 2 years ago

Another way to potentially do this would be filtering by Traefik Entrypoint, that's how I'm currently designating which containers are accessible locally vs publicly