We are trying to run certbot in Docker Swarm with service discovery. The issue we have is that certbot immediately starts the challenge with a new URL, before the reverse proxy has picked up the container through service discovery. When the reverse proxy has registered certbot and the routing for /.well-known/acme-challenge
is set up, certbot has already died. Then Docker Swarm starts certbot again - and the circle starts again.
In the docs seems to be no option to let certbot wait for like 15 seconds after startup. Is there a workaround?