Is there an easy, official way to have traefik dump the SSL certificate in .pem format?

I have a couple of questions. I am using traefik in a docker container to run my website. I am a big fan and am running version 1.7.

I am setting up quite a few docker containers, one of which is a mail server that requires an SSL certificate. In particular, I am following a script that does everything for me, but it assumes I am using nginx and a .pem key file. I substituted traefik for nginx and have it making my SSL cert successfully. However, I am unsure of an easy way to get the .pem key and keep it updated for the mail server. I know traefik stores it in the acme.json file and that traefik automatically updates the SSL cert. How do I get this functionality with my mail server?

I saw #1484 where people discussed the best way of getting the SSL certificate out of the acme.json. It was not clear to me if there is an easy, official way to get the SSL certificate in .pem format outside of some scripts or running a cron job.

Can anyone give some pointers?

David

Not sure about "official" way, but I've been using "dumpcerts.sh" scripts from here.

Looking at your thread this seems to be as official as it gets, at least for now, I personally did not have experience using this one though.

Does the dumpcerts.sh run everytime traefik updates the SSL cert? Thanks,
David

No it does not. Certhelper script in the same folder can re-run it, but it's unlikely to be usable without changes, since it's crafted for a specific container.

Okay, thanks for your help. I will probably use the dumpcerts on the acme.json file, then have a cron job run in the container to keep the mail server SSL updated as well.