Shadowghost / mailcow-mailman3-dockerized

Mailcow combined with Mailman3
35 stars 3 forks source link

Letsencrypt and cron #12

Closed cuddylier closed 1 year ago

cuddylier commented 4 years ago

I notice you disable let's encrypt SSL certificates with "SKIP_LETS_ENCRYPT=y" in the config.

Does this mean for any new domains I add to mailcow, I must manually update my Let's encrypt issuer e.g. certbot?

I found a 'cronjob' file in "templates/apache2" that has the following in it:

#!/bin/bash
cd /opt/mailcow-mailman3-dockerized && docker-compose down
certbot renew --pre-hook "systemctl stop apache2" --post-hook "systemctl start apache2" --renew-hook "systemctl reload apache2" --quiet
cp /etc/letsencrypt/live/<your-domain-here>/fullchain.pem ./data/assets/ssl/cert.pem
cp /etc/letsencrypt/live/<your-domain-here>/privkey.pem ./data/assets/ssl/key.pem
docker-compose restart

Is there anyway to rewrite this to avoid stopping all containers just to renew the SSL certificates? Should the <your-domain-here> be my primary mailcow domain and not the mailman domain too? I tried this and ran the script, it stopped all the containers and removed them but then they couldn't start back up: https://pastebin.com/raw/MQFqCNdC

Thanks