Create public DNS record when creating a container using docker-compose

Hello forum,

I have a simple docker setup with one synology as my docker host. I am using the Traefik reverse proxy in combination with Let’s encrypt to host some applications for personal use.
When i create a container with docker-compose i can configure the reverse proxy using labels.
After the container has started, the labels will automaticly configure traefik and traefik will automatic request a SSL certificate using Let’s encrypt. Let’s encrypt uses DNS challange and traefik creates a DNS TXT record so Let’s encrypt can verify Domain ownership.

What i am looking for is a way to automatic the creation of the Host A record and PTR record in DNS when creating a container using docker-compose. I hope there is an (docker based) application or a traefik plugin that is able to create the DNS records when creating a container.

Thanks

Wouter Iliohan